Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to auto scroll to see the bottom of the jtextarea?

 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have a JTextArea with JScrollPane. The jTextArea shows data from a thread that runs in the background. Problem is that when new data comes I need to scroll down in order to see the new data. Question: how to automatically scroll so the bottom of the jTextArea will always shown?

Thanks!


 
Rob Camick
Ranch Hand
Posts: 2600
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Text Area Scrolling.
 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS ROB!!!

for JDK5...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic