Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea doesnot scroll automatically...

 
Parth Bhatt
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

i have a JTextArea to which i add text using the append method. The JTextArea is inside a JScrollPane. When there is enough text added in the JTextArea, it does not scroll automatically to show the text added last. Therefore the text added last gets hidden.

Can somebody suggest a way using which i could scroll down the textarea automatically as the text is added.

Thanks...!!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setCaretPosition(..)
 
Parth Bhatt
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael...!! That solved the problem...!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!