Yeah, but those notifications (insert in particular) get called
whenever the user types a character and whenever JTextField.setText()
is called. I'm really looking for a way to nail down that a drop
happened, or at least that a "bulk insert" happened.
jeff
On Jan 11, 2006, at 1:16 PM, Scott Palmer wrote:
On 11-Jan-06, at 2:09 PM, Jeff Martin wrote:
So both Apple (with 1.4) and Sun (with 1.5) have now added
automatic String drop support to all JTextFields. Unfortunately, I
can't figure out a way to get notification that a string has been
dropped on a text field. There is no support for a ChangeListener,
No, JTextFields are backed by a document. You should be able to
get what you want with a DocumentListener.
someTextField.getDocument().addDocumentListener( new
DocumentListener() {
public void removeUpdate(DocumentEvent e) { }
public void insertUpdate(DocumentEvent e) { }
public void changedUpdate(DocumentEvent e) { }
} );
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden