This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

auto-scroll for a JScrollPane...  RSS feed

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a function to make a JScrollPane auto-scroll as
text is appended to it?

Justin
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by autoscroll?

If yoy want the scrollbar to scroll to bottom every time some text is appended use the following



the MYTextArea is the variable for your text area. Use MyTextArea.getDocument().addDocumentListener( new UpdateListener() ); to add the listener

// Mathias
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!