| Author |
Using JScrollPane
|
Chuck Lan
Greenhorn
Joined: Feb 17, 2000
Posts: 6
|
posted

0
|
i added a JTextArea under JViewport of JScrollPane, and I'm sending text to the JTextArea using the append(String) method. How do I make it so that when the JTextArea is filled with text, that JScrollPane will scroll down automatically as more String is being appended to JTextArea?
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
This is just a guess, but I'd try calling validate() or update() after you append text if it's not happening automatically.
|
"I'm not back." - Bill Harding, Twister
|
 |
Chuck Lan
Greenhorn
Joined: Feb 17, 2000
Posts: 6
|
posted

0
|
I called setValue(int) of JScrollBar,and set it to getMaximum() of JScrollBar. That seems to work. Chuck
|
 |
 |
|
|
subject: Using JScrollPane
|
|
|