Forums Register Login

JTextArea scroll bar

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 

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.

 
+Pie Number of slices to send: Send
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
The only cure for that is hours of television radiation. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2176 times.
Similar Threads
How to use CardLayout Manager
Arrays Won't Work
observable
AWT FlowLayout to BorderLayout
How to group radio buttons
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 03:52:55.