Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

One JFrame-Two Jpanels  RSS feed

 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have a JFrame.On the content pane of JFrame i'll placing a login JPanel.
Soon after the login i want to completely destroy the Login JPanel and the JFrame content pane should be occupied by one more JPanel say product specific JPanel.
I know this can be achieved by card layout.But will the cardlayout distroy the JPanel?(shouldn't be cached i.e reference should be distroyed).

Your valuable input is definetly needed.Thanks in advance
Prashu
 
satishkumar janakiraman
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using card layout, you can remove the first panel after successful authentication and add the second panel to the frame.
Card Layout is equivalent to/similar to Tabs

bye for now
sat
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make the login a dialog.
if login successful, show the frame and dispose the dialog
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!