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 to represent JPanels in a 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 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: 20079

Equally divided usually warrants a GridLayout.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: How to represent JPanels in a JPanel
It's not a secret anymore!