Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2008, 09:44 AM
Member
 
Join Date: May 2008
Posts: 29
adeeb is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Forms dankonsoer New To Java 1 08-07-2008 01:06 PM
login.jsp roo7 Enterprise JavaBeans 4 07-15-2008 07:03 PM
JSP - Login Page Example JavaForums Java Blogs 2 08-13-2007 10:21 AM
Login with mysql fernando JavaServer Pages (JSP) and JSTL 1 08-07-2007 04:30 PM
problems with Login Peter Java Servlet 2 06-12-2007 02:50 PM


All times are GMT +3. The time now is 04:41 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org