标签:documentlistener
-
使用Java DocumentListener的更智能方法 - java
目前,我在每个文本字段上都使用DocumentListener来实时验证用户的输入,但是我认为必须有一种更聪明的方法,因为我要重复很多次自我。 有更聪明的方法吗? nameJTextField.getDocument().addDocumentListener(new DocumentListener() { @Override public void in […]
目前,我在每个文本字段上都使用DocumentListener来实时验证用户的输入,但是我认为必须有一种更聪明的方法,因为我要重复很多次自我。 有更聪明的方法吗? nameJTextField.getDocument().addDocumentListener(new DocumentListener() { @Override public void in […]