/**
  * Fügt einer {@link JComboBox} an allen nötigen Stellen einen {@link EditorChangeListener} hinzu.
  *
  * @param comboBox
  * @param editorChangeListener
  */
 private void addChangeListenerToComboBox(
     JComboBox comboBox, final EditorChangeListener editorChangeListener) {
   BasicComboBoxEditor editor = (BasicComboBoxEditor) comboBox.getEditor();
   JTextField textField = (JTextField) editor.getEditorComponent();
   textField.getDocument().addDocumentListener(editorChangeListener);
   comboBox.addItemListener(editorChangeListener);
 }
예제 #2
0
 @Override
 public void setItem(Object anObject) {
   super.setItem(anObject);
 }