• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Control Visible Portion of JTextArea Displayed by JScrollPane

 
Tom Cockerline
Greenhorn
Posts: 7
  • 0
  • 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
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Swing Forum here.
[ January 10, 2004: Message edited by: Cindy Glass ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic