Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scrolling downwards in a jtextarea

 
sushant prabhu
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am having a JTextArea the content of which gets appended when a certain method is called. The scrollbar scrolls upwards when a new line gets appended to the jtextarea.
But the scrollbar scrolls downwards when the line is appended to the JtextArea if i am appending the line via actionPerformed method.
What i want is to force a downward movement of the scrollbar as and when the text is appended to the Jtext area. how do i force this behaviour.
I am having a JScrollPane on which i am adding the Jtextarea
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic