--- old/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-07-20 16:45:53.000000000 +0400 +++ new/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-07-20 16:45:52.000000000 +0400 @@ -222,6 +222,12 @@ protected boolean setXAWTTextField(String txt) { text = txt; if (xtext != null) { + // Please note that we do not want to post an event + // if setText() replaces an empty text by an empty text, + // that is, if component's text remains unchanged. + if (xtext.getDocument().getLength() == 0 && txt.length() == 0) { + return true; + } // JTextField.setText() posts two different events (remove & insert). // Since we make no differences between text events, // the document listener has to be disabled while