aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swings" Watch "swings" New topic
Author

swings

Greg Walker
Greenhorn

Joined: Sep 07, 2006
Posts: 24
When dumping stuff into a text area how do you set up the side scroll bar so you can move up and down the text area to view info?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Instantiate the scrollPane and add it to the textarea. Now add this scrollpane to your JPanel.

The link shows you how.

http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Originally posted by John Meyers:
Instantiate the scrollPane and add it to the textarea.


Technically, you add the JTextArea as a child of the JScrollPane.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: swings
 
Similar Threads
how can i do this in javascript?
formatting the textarea form field in a servlet
clearing a text area
Dynamically setting TextArea size
JTextArea and scrolling