File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Swing" Watch "Swing" New topic


Tejas Kansara
Ranch Hand

Joined: Dec 14, 2000
Posts: 38
In Swing how to add scrollbar to textarea b'coz by default it doesn't take it.
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
From the JTextArea AIP:
The java.awt.TextArea internally handles scrolling. JTextArea is different in that it doesn't manage scrolling, but implements the swing Scrollable interface. This allows it to be placed inside a JScrollPane if scrolling behavior is desired, and used directly if scrolling is not desired.
So you add your JTextArea to a JScrollPane.
I agree. Here's the link:
subject: Swing
It's not a secret anymore!