Forums Register Login

auto-scroll for a JScrollPane...

+Pie Number of slices to send: Send
is there a function to make a JScrollPane auto-scroll as
text is appended to it?

Justin
+Pie Number of slices to send: Send
What do you mean by autoscroll?

If yoy want the scrollbar to scroll to bottom every time some text is appended use the following



the MYTextArea is the variable for your text area. Use MyTextArea.getDocument().addDocumentListener( new UpdateListener() ); to add the listener

// Mathias
He was expelled for perverse baking experiments. This tiny ad is a model student:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 754 times.
Similar Threads
focus on new added line of JTextArea.. please Help
JTable in JScrollPane in JSplitPane
JTextArea question .
how to auto scroll to see the bottom of the jtextarea?
JScrollPane and JPanel
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:38:11.