File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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
I agree. Here's the link:
subject: Over writting JA\Panel content
It's not a secret anymore!