This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Control Visible Portion of JTextArea Displayed by JScrollPane  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,
I have a JTextArea component that is displayed via a JScrollPane. Sometimes the text message that I place into the JTextArea component is too big to fit in the visible area of the JScrollPane, so the vertical scrollbar is activated. The first time my app encounters such a text message it positions it within the pane such that the top of the message is visible. So far, so good. However, subsequent messages are positioned such that the bottom of the message is visible, so that one has to scroll up to begin reading the message.
Is there a way to force the pane to always position itself at the beginning of the text area?
Thanks in advance,
Tom
 
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Swing Forum.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!