• Post Reply Bookmark Topic Watch Topic
  • New Topic

JInternalFrame  RSS feed

 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to bring only one internal frame at a time when pressing the button in swings
 
Agador Paloi
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A couple of ways to handle exsisting frames before displaying a new frame that I have used is to either
1. iconify the frame for future use:
getDesktopManager().iconifyFrame(main_menu);
or
2. close the frame :
getDesktopManager().closeFrame(main_menu);
[ August 08, 2008: Message edited by: Agador Paloi ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Showing only one internal frame at a time defeats the purpose of using internal frames and the idea behind a MDI all together.
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. Using a CardLayout would be a better idea.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!