Hi!
 
 
When I'm adding an action listener to a JTextField .. when entering some text and then pressing enter .. the actionPerformed() method gets called twice even if there is just a single listener assigned ..
 
Since I'm using Visual Age for Java the debugger has shown me some difference for the two events .. a JComponent internally hold a private property "flags" .. and for the source of the event (i.e. the JTextField instance itself) I found:
 
1st event: the flags property is set to 16
2nd event: the flags property is set to 0
 
The problem is I'm not able to get access to the flags property to maybe only accept action performed when flags==0 ..
 
 
Does anybody know how to get rid of fireing action performed twice for JTextField ??
 
 
Thanks for your help,
Gerald.
 
 
PS: This is with JDK 1.2.2 ..

Reply via email to