Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea  RSS feed

 
Manuel Paco
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way I make my text appear in JTextArea(in JScrollPanel)
without scrolling it up or down.( I use instanceJTextArea.append() and every time I append something it is out of the view)
 
Bill Liteplo
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Probably should move this to Swing forum.]
Do you mean without manually scrolling?
Programmatically, you can do

or

and I'm sure there are other ways.
Bill
 
Manuel Paco
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - OK - I'll move it to Swing .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!