Finalfantasykid
February 5th, 2010, 07:02 AM
this.bioPanel = new JScrollPane();
this.bioPanel.setBorder(new TitledBorder("Biography"));
this.text = new JTextArea();
this.text.setLineWrap(true);
this.text.setWrapStyleWord(true);
this.text.setEditable(false);
this.text.setOpaque(false);
this.bioPanel.getViewport().add(this.text);
This will add a JTextArea to a JScrollPane. My only problem that the scrollpane starts at the very bottom of the text. I would like it to start at the beggining instead, but I have been unable to find an appropriate method to do this.
this.bioPanel.setBorder(new TitledBorder("Biography"));
this.text = new JTextArea();
this.text.setLineWrap(true);
this.text.setWrapStyleWord(true);
this.text.setEditable(false);
this.text.setOpaque(false);
this.bioPanel.getViewport().add(this.text);
This will add a JTextArea to a JScrollPane. My only problem that the scrollpane starts at the very bottom of the text. I would like it to start at the beggining instead, but I have been unable to find an appropriate method to do this.