• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hide Jframes

 
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
Saloon Keeper
Posts: 3137
72
  • 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
Marshal
Posts: 52516
118
  • 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: 2699
10
  • 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!