Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jun 20, 2013 4:17 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Apr 25, 2007 8:57 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
hey Guys.

I have 2 text fiwlds now on the login page, name and password.

The following code inst working. It enables the second field (password) on activation of the first (name), but it doesn't disable name :(

Instead I get the keystrokes in both fields when I type in the apssword field.

Help?

jk

Code:
           nameInput =
               new TextField(gameContainer, systemFont, LOGINTEXTX, LOGINTEXTY,
                   200, 50, new ComponentListener() {
                       public void componentActivated(BasicComponent arg0) {
                          nameInput.setFocus(false);
                           passwordInput.setFocus(true);

                       }
                   });
           passwordInput =
               new TextField(gameContainer, systemFont, LOGINTEXTX, LOGINTEXTY+70,
                   200, 50, new ComponentListener() {
                       public void componentActivated(BasicComponent arg0) {
                          passwordInput.setFocus(false);
                          nameInput.setFocus(true);
                           doLogin();

                       }
                   });


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 10:17 pm 
Offline

Joined: Wed Mar 21, 2007 7:59 pm
Posts: 96
Never mind. Figured it out.

brain fart


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group