Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem in upgrading java application from JDK 1.1.8 to JDK 1.5.0_12 ?

843798Nov 12 2009 — edited Nov 18 2009
Hello Everyone,
I am having a problem while upgrading application from JDK 1.1.8 to JDK 1.5.0_12. The "KeyPressedEvent" of textfield track almost all key events and works accordingly but when TAB key is pressed then there is no response. But the same application works fine in JDK 1.1.8 and all key pressed are tracked and prints accordingly.
public class Test extends KeyListenerFrame{
-----
 void txtKey_keyPressed(KeyEvent e) throws Exception
  {    
      System.out.println("keys::"+e.getKeyCode());
      if (e.getKeyCode() == KeyEvent.VK_TAB || e.getKeyCode() == KeyEvent.VK_ENTER)
      {
              System.out.println("Key pressed:1:"+e.getKeyCode());
     }
}

}
Can anybody suggest me how to track key pressed for TAB key in textfield using JDK 1.5.
Thank you.

Edited by: ritesh163 on Nov 15, 2009 10:08 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2009
Added on Nov 12 2009
9 comments
220 views