This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Set Orientation of JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Set Orientation of JPanel" Watch "Set Orientation of JPanel" New topic

Set Orientation of JPanel

Aksa Saki

Joined: Oct 13, 2011
Posts: 1
I'm creating a swing based application and want to show a panel on label click.
It is something like:
JFrame F contains JPanel P1
P1 contains JPanel P2 and P3
P3 contains JLabel L
when I click on L, I want another JPanel P4 to placed on P1.

When I use setComponentZOrder(,) , I get Exception: container and component should be on the same window.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19541

Can you please show us an SSCCE (click on it) that displays the problem, and the exception stack trace?

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Set Orientation of JPanel
Similar Threads
Java GUI development question.
Single Portlet Refresh in a Portal Page
Drawing (mouse events)
How to use CardLayout Manager