This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.



Less than 42 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hide Jframes  RSS feed

 
kaut raut
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi if we have one jframe and two-three Jpanels and we need to hide them and show another Jframe, then we need to hide jframe or jpanels ?
 
Tony Docherty
Bartender
Posts: 3195
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming the JFrame in question holds the JPanels you mention then you just need to hide the JFrame and the JPanels will be hidden as a consequence.
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you want to hide a frame? You can simply minimise it (but Swing calls that iconifying).
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally an application should only have a single JFrame so I don't know why you want to hide it.

You may have child dialogs that display to gather/display information.

Or you can use a CardLayout to swap panels in a JFrame.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!