This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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: 20750
30
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