• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how handle multiple form(panels)

 
ravi v kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i found solution and completed

thanks for all particated to solve my problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic