Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Set Orientation of JPanel  RSS feed

 
Aksa Saki
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please show us an SSCCE (click on it) that displays the problem, and the exception stack trace?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!