*
The moose likes Swing / AWT / SWT and the fly likes JTextArea scroll bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea scroll bar" Watch "JTextArea scroll bar" New topic
Author

JTextArea scroll bar

chop ficaro
Ranch Hand

Joined: May 02, 2010
Posts: 30
ive read that scroll bars are supposed to appear when the text exceeds the area, but for my program, they are not appearing. heres my program, click the radio buttons to add content to the text area and see that the scroll bar does not appear. i am running windows 7 64
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

chop ficaro wrote:ive read that scroll bars are supposed to appear when the text exceeds the area...


I don't know where you read that, but it conflicts with what the API documentation for the class says:

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.
chop ficaro
Ranch Hand

Joined: May 02, 2010
Posts: 30
lol, the first google result for "JTextArea scroll" says that
lol those idiots, that's why i come here
i have my scroll pane now and it works great
TYVM
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JTextArea scroll bar
 
Similar Threads
How to group radio buttons
How to use CardLayout Manager
Arrays Won't Work
observable
AWT FlowLayout to BorderLayout