|
-
February 22nd, 2000, 12:00 AM
#1
How set JScrollPane to bottom?
I've set up a a JScrollPane with a JTextArea as its contents. Each time my program runs the JTextArea gets filled up, but you have to manually scroll to the bottom to see the latest information. Is there some setting that will make the viewing area always position to the bottom? Alternately, is JScrollPane and JTextArea the way I want to go? Here's how I've set the code up:
JPanel cp = new JPanel();
cp.setLayout(new FlowLayout());
processOutput = new JTextArea(10,40);
JScrollPane scrollOutput = new JScrollPane(processOutput);
cp.add(scrollOutput);
setContentPane(cp);
setVisible(true);
Thanks in advance for any help you can give me.
Sam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|