Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JScrollPane and JFrame

Status
Not open for further replies.

godcomplex

Programmer
Apr 24, 2002
94
US
Hello Everyone,

I have a JFrame with a JScrollPane set as its content pane. The viewport view for the scroll pane is set as a panel, with a number of labels, buttons, lists, etc. added to it. The problem is, when I make the window smaller than the panel with all of the components, I don't get the scroll bars like I would expect.

I know there probably something really dumb that I am forgetting to do, but does anyone have any ideas how to get this to work. BTW, I can post a little code if some of you think that may help, but its pretty straight forward.

-gc "I don't look busy because I did it right the first time."
 
unless you explicitly set the scrollbars to appear at all times, they will only appear once your panel requires them i.e. when your data gets larger than the space they are held in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top