Ditching focus of a JTextField
- From: "Rob McDonald" <robm@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 10:27:13 -0400
I have implemented a simple JTextField in my application. I am using an
ActionListener to perform an action when the user presses enter after
completing input. This works fine....
However, after pressing enter, the cursor remains blinking in the box. The
user has no feedback that his input has been accepted. I need to force the
focus away from the textfield after input is complete. However, I don't
really want focus to go anywhere else in particular....
Also, is there an event that triggers when a user manually changes focus off
of the text box? I would like my action to occur any time the user changes
the value (once they're done typing and has changed focus by clicking on
something else), not just when the user presses enter.
Thanks in advance,
Rob
.
- Follow-Ups:
- Re: Ditching focus of a JTextField
- From: Rob McDonald
- Re: Ditching focus of a JTextField
- From: Roedy Green
- Re: Ditching focus of a JTextField
- From: Monique Y. Mudama
- Re: Ditching focus of a JTextField
- From: Vova Reznik
- Re: Ditching focus of a JTextField
- Prev by Date: Re: how to get rid of Java applet banner?
- Next by Date: Re: Ditching focus of a JTextField
- Previous by thread: Can not enter ^
- Next by thread: Re: Ditching focus of a JTextField
- Index(es):