private void setEditable(final JComboBox combo) {
combo.setEditable(true);
if (combo.getEditor().getEditorComponent() instanceof JTextField) {
JTextField txt = (JTextField) combo.getEditor().getEditorComponent();
// XXX check if there are not multiple (--> redundant) listeners
txt.getDocument().addDocumentListener(new UIUtil.DocumentAdapter() {
public void insertUpdate(DocumentEvent e) {
if (!UIUtil.isWaitModel(combo.getModel())) {
checkValidity();
}
}
});
}
}
GUIRegistrationPanel.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录