This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Over writting JA\Panel content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Over writting JA\Panel content" Watch "Over writting JA\Panel content" New topic
Author

Over writting JA\Panel content

Prashanth Bhanu
Ranch Hand

Joined: Sep 25, 2003
Posts: 110
Hi Friends,

I've created a JFrame with Layout as Border Layout.At the center of Border layout i've placed a JPanel.Moment this JFrame is opened, at the center you can see a JPanel consisting of textboxes waiting for the user id and password to be inpued.
Now my problem is ,when user logs in ,a new screen should be painted at the Center area of the JFrames content pane over writing the existing content.
This can be achieved if you could place 'n' number of JPanels inadvance and depending the condition show the interested JPanel by hidding rest of the JPanels.
My criteria is ,I want to over write during the run time.There is no limit for the subsequent screens overwriting each other.
How this can be achieved.......thanks in adavnce
thanks in advance
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
set the center panel as a CardLayout
 
GeeCON Prague 2014
 
subject: Over writting JA\Panel content