Hi Ranchers, I need a listener on a JTextField to be actioned so to speak when a click is made in the box using the cursor. Using ActionPerformed only works when RETURN is hit. tmpTimeField.addActionListener(myListener); Any ideas how this can be solved ? Is there a Click Listener ? Thanks / James
James Clinton
Ranch Hand
Joined: Jun 23, 2003
Posts: 190
posted
0
Problem solved using FocusListeners.. Example:
Dorothy Finkel-Laverty
Ranch Hand
Joined: Nov 24, 2001
Posts: 51
posted
0
Silly question, but have you thought about using a MouseListener? You can count the clicks and everything. The problem with the solution you are proposing is that even if the user tabs to the text field, the event will be fired. Is that what you want?