Capturing an event when a Textfield changes.
From: Bilal Sallakh (afkar_at_mail2world.com)
Date: 10/28/04
- Previous message: Kannan S: "Re: Capturing all KeyEvents in the system"
- Next in thread: Hegemony Cricket: "Re: Capturing an event when a Textfield changes."
- Reply: Hegemony Cricket: "Re: Capturing an event when a Textfield changes."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 11:31:36 -0700
In this code fragment:
public class FrameLayers extends JFrame {
JTextField txtWidth = new JTextField();
public FrameLayers() {
txtWidth.addInputMethodListener(new InputMethodListener() {
public void caretPositionChanged(InputMethodEvent event) {
}
public void inputMethodTextChanged(InputMethodEvent event) {
System.out.Println("Hallo Welt");
}
}
}
}
I want to do something (here printling a string) when the user type
something in the JTextField.
The code doesn't work..
Why?
In the docs I read that getInputMethodRequests should be used
somewhere... How?
Thanks in advance...
- Previous message: Kannan S: "Re: Capturing all KeyEvents in the system"
- Next in thread: Hegemony Cricket: "Re: Capturing an event when a Textfield changes."
- Reply: Hegemony Cricket: "Re: Capturing an event when a Textfield changes."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]