Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextArea scroll bar

 
chop ficaro
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20955
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic