Results 1 to 1 of 1
Thread: Problem with login
- 06-08-2008, 08:44 AM #1
Member
- Join Date
- May 2008
- Posts
- 29
- Rep Power
- 0
Problem with login
Hi,
I have designed a simple application using card layout. The layout of first card in it is set as group layout. This first card contains two JLabels, One text field, password field and a button named ok.
i have used two strings, one to store the name and other to store the password. Now what i need is when i enter the same name and password then i should get the next card. But when i click the ok button without entering any text in the fields, then also i am able to get the next card. For the button i have written the Listener. I guess the problem is with my code and the code is as follows:
final String str = "adeeb";
final String str1 = "alexander";
ok.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
if(currcard==1)
{
if(pf.getText().equals(str1));
{
if(tf.getText().equals(str));
{
cl.show(panel, "2");
}
}
}
}
});
So i am unable to solve this problem. Please Some One solve it.
Similar Threads
-
login.jsp
By roo7 in forum Enterprise JavaBeans (EJB)Replies: 5Last Post: 12-02-2008, 03:58 PM -
Login Forms
By dankonsoer in forum New To JavaReplies: 1Last Post: 08-07-2008, 12:06 PM -
Login with mysql
By fernando in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-07-2007, 03:30 PM -
problems with Login
By Peter in forum Java ServletReplies: 2Last Post: 06-12-2007, 01:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks