This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Over writting JA\Panel content" Watch "Over writting JA\Panel content" New topic

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
jQuery in Action, 3rd edition
subject: Over writting JA\Panel content
It's not a secret anymore!