This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How do I add JPanel to an existing JPanel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How do I add JPanel to an existing JPanel?" Watch "How do I add JPanel to an existing JPanel?" New topic
Author

How do I add JPanel to an existing JPanel?

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
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

Joined: May 18, 2004
Posts: 434
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

Joined: Aug 20, 2004
Posts: 138
Try JFrameBuilder


Download Java GUI Builder, <a href="http://www.mars3000.com" target="_blank" rel="nofollow">http://www.mars3000.com</a>
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How do I add JPanel to an existing JPanel?
 
It's not a secret anymore!