File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I add JPanel to an existing JPanel?