This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I add JPanel to an existing JPanel?

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class that is a JPanel. I'd like to add a smaller beveled border
JPamel within that. How do I do that?

Thanks
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same as you would add any component to your JPanel.

JPanel panel1 = new JPanel();
JPanel panel2 = new JPanel();

...

panel1.add(panel2);

Cheers,
Rachel
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try JFrameBuilder
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic