This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem of adding panel to another panel

 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hello everyone,

I like to add panel1 to another panel extends JFrame but the problem when I add a panel1 to panel , the panel displays without scrollpane with a very large size.

panel1:


Frame:



Thank you very much.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> the panel displays without scrollpane with a very large size.

sounds like you need to give the scrollpane a preferredSize
 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic