• Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane and scroll bars

 
Colleen Lynch
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I correct in saying that scroll bars should appear by default when they are needed in a JScrollPane?
I have a JTree in a JScrollPane and when I expand the tree, the scroll bars do not appear.
Does anyone have any suggestions on what could be wrong?
Thanks...
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u add some code?
maybe we will spot the problem.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using any special tree cell renderers? A lot of the size of the tree is based off of the size of it's cells. So you may have to implement getPreferredSize() in your tree cell renderers to return the correct size.

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!