IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes Switching Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Switching" Watch "Switching" New topic
Author

Switching

Roshan Wankhade
Greenhorn

Joined: Dec 07, 2011
Posts: 8

Hi,
I' new to Swing...
I need to open a new form once OK is clicked for the login form.
I taken this login form on one JPanel in center of JFrame.
Now other Form should be open in same JFrame by disabling previous login JPanel..
I don't want new Jframe.

How to I do it?
Please help me...
Michael Dunn
Rancher

Joined: Jun 09, 2003
Posts: 4041
The login panel should be in a JDialog,
in the background the JFrame can be
constructed,and if login successful
frame.setVisible(true);

if you really want it all in a single frame,
look up CardLayout
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 3221

Please BeForthrightWhenCrossPostingToOtherSites
https://forums.oracle.com/forums/thread.jspa?threadID=2339149


luck, db
There are no new questions, but there may be new answers.
 
 
subject: Switching
 
Threads others viewed
Problem re-opening a JFrame
Multiple JFrames ?
Why are my JFrames closing?
Communicate between JFrames
Need help on login frame in java.
IntelliJ Java IDE