aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Control Visible Portion of JTextArea Displayed by JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Control Visible Portion of JTextArea Displayed by JScrollPane" Watch "Control Visible Portion of JTextArea Displayed by JScrollPane" New topic
Author

Control Visible Portion of JTextArea Displayed by JScrollPane

Tom Cockerline
Greenhorn

Joined: Dec 20, 2003
Posts: 7
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

Joined: Sep 29, 2000
Posts: 8521
Moved to the Swing Forum.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Control Visible Portion of JTextArea Displayed by JScrollPane
 
Similar Threads
JTextArea
Control Visible Portion of JTextArea Displayed by JScrollPane
JScrollPane JViewport question
JScrollPane not working
weird glitch in Swing GUI