| Author |
Scrolling a JTextPane within a JScrollPane
|
Robert Miller
Ranch Hand
Joined: Jun 18, 2004
Posts: 56
|
|
I have a problem which seems so elementary that I'm embarrassed to bring it up, but I can't find the solution through the javadocs or my other resources. I have a JTextPane which I am using to display data, output only. I am placing it in a JScrollPane. What I want to do is have it scroll to the bottom when I add text to it. Manually setting the vertical scroll bar to its maximum value doesn't seem to work. Can anyone help me with this? Thanks!
|
 |
Charles Dupin
Ranch Hand
Joined: Oct 18, 2002
Posts: 94
|
|
You may try to work with the viewport. Check this: http://javaalmanac.com/egs/javax.swing.table/Vis.html?l=rel
|
Charles.<br />(SCJD2)
|
 |
 |
|
|
subject: Scrolling a JTextPane within a JScrollPane
|
|
|