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!

TAB KEY PROBLEM, NetBeans IDE 6.7.1 desktop application

843807Nov 27 2009 — edited Nov 27 2009
I need to catch the tab key for all my components (mainly JTextFields).
here is my code:
private void DateOpen1KeyPressed(java.awt.event.KeyEvent evt) {
JOptionPane.showMessageDialog(null, //no owner frame
"evt.key code: " + evt.getID());
}

this should display the ID for tab but displays nothing.
When pressing any other key like enter, shift, etc., I am getting 401.

Please help!
I read a lot of answers about some similar problems, cannot get to an answer.
I think it should be just easy because the tab is working automatically from right to left and getting to each component on my JDialog.
I need to cahnge the tab direction and make sure they cannot get with tab to some of the components.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2009
Added on Nov 27 2009
11 comments
554 views