aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to represent JPanels in a JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to represent JPanels in a JPanel" Watch "How to represent JPanels in a JPanel" New topic

How to represent JPanels in a JPanel

partha phukan
Ranch Hand

Joined: Mar 13, 2011
Posts: 31
Sir/madam..., i have a problem regarding how to use JPanels inside one JPanel. i have two JPanel (panel1, panel2). I have used JSplitPane and divide them horizontally into two sides.

Now in Jpanel(panel1), i need to display another three JPanels(panel3, panel4,panel5). Now what layout should i follow..? i have tried to use Border Layout and JSplitPane but not succeeded. I need to divide them equally. What layout should i use please give me some suggestion....

Thank you in advance.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19672

Equally divided usually warrants a GridLayout.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: How to represent JPanels in a JPanel