Which type of details.you need .
I .ve already given code and now i just want to set username and password in two fields. and i also want to enable login on basis of information of username n password.....
Welcome to the ranch Vivek.
When you post code, please use code tags I have edited your existing post to add the code tags. As you can see it makes the code much more readable and easier to understand
For password you have Password specific field- JPasswordField.
So for the event handler for Login action- You get both the username and the password from their respective fields. And then compare them with the correct values. If it doesn't match you can ask the user to reenter the details.
Now the concern would be to show different UI Screens- One would be for Successful login. For this you can either use a LayoutManager (CardLayout) and then keep setting the relevant component in the layout as Visible.
Other way would be to use a JDesktopPane and then add multiple JInternalFrame to it. So you set the visibility to false for all the Internal frames and then keeping setting respective internal frames as visible.
Vivek Phogat
Greenhorn
Joined: Jan 11, 2011
Posts: 3
posted
0
Mohamed Sanaulla wrote:For password you have Password specific field- JPasswordField.
So for the event handler for Login action- You get both the username and the password from their respective fields. And then compare them with the correct values. If it doesn't match you can ask the user to reenter the details.
Now the concern would be to show different UI Screens- One would be for Successful login. For this you can either use a LayoutManager (CardLayout) and then keep setting the relevant component in the layout as Visible.
Other way would be to use a JDesktopPane and then add multiple JInternalFrame to it. So you set the visibility to false for all the Internal frames and then keeping setting respective internal frames as visible.
Vivek phogat wrote: Thanks Sir, That was my very first post on javaranch .com So sorry also
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.