Possible Duplicate:
How to set AUTO-SCROLLING of JTextArea in Java GUI?
I'm creating an application in which the user types the text in a TextField
from which the text is appended to a TextArea
when an actionPerformed.
The TextArea
is added on a JScrollPane
. When the number of line out of declared column the user can scroll to see the text. But he need to scroll every-time when he enters some text to TextArea
via TextField
because the last line appended to the TextArea
does not automatically scroll to last line.
Can anybody help me out there how to either automatically or when the actionPerformed, the TextArea
will be scrolled to last?