posted 20 years ago
Hello
I have created a JTextArea which at present has scrolling abilities. The problem is that at present when the textarea fills the jtext area still displays the same text whilst giving the ability to scroll for the extra not shown. Is it possible to alter this behaviour so that the JTextArea automatically scolls so the most recent bit of text added is always viewable.
I have the following lines of code at present
text = new JTextArea("",9, 24);
text.setLineWrap(false);
text.setEditable(false);
text.setWrapStyleWord(true);
JScrollPane scrollingResult1 = new JScrollPane(text);
window.getContentPane().add(scrollingResult1, BorderLayout.NORTH);
Many thanks
John