| Author |
how handle multiple form(panels)
|
ravi v kumar
Ranch Hand
Joined: Dec 14, 2004
Posts: 56
|
|
my question is i am planing to develop small application using swings in which, i place the jmenu in the main frame which contains Menu->Login ->Logout(initially disabled) ->Exit Operations(initially disabled) -> my operations related to the application when the user clicks login and opening a new frame which contains the userid and password to enter and after entering the user has to submit i am validating the userid and password after that if he is valid user then i have to go back to main frame and enable the menu ->logout operations menus. my questions is how to open new frame when user clicks "login" and how to get the focus bach to main frame the user enters the login form. reply me vth regards rk
|
 |
Constanze Michaelis
Greenhorn
Joined: Jul 28, 2004
Posts: 28
|
|
hi, you have to register the menu entry "logout" at the ActionListener. In method actionPerformed(Event e) you have to open the log in frame or the login dialog. hope this may help bye Constanze [ December 16, 2004: Message edited by: Constanze Michaelis ]
|
 |
ravi v kumar
Ranch Hand
Joined: Dec 14, 2004
Posts: 56
|
|
thanx alot for ur reply can i get the values from that newly created frame? like the Userid and password he Entered with regrds rk
|
 |
Constanze Michaelis
Greenhorn
Joined: Jul 28, 2004
Posts: 28
|
|
for getting the password look up the sun tutorial under how to use JPasswordField for getting username you have to take the getText() method on your JTextField bye Constanze
|
 |
ravi v kumar
Ranch Hand
Joined: Dec 14, 2004
Posts: 56
|
|
hi all, i found solution and completed thanks for all particated to solve my problem
|
 |
 |
|
|
subject: how handle multiple form(panels)
|
|
|