void (ActionEvent e) { // This listener overrides one from BasicComboBoxUI$Actions // Close popup manually instead of default handler if (myEvaluateComboBox.getComboBox().isPopupVisible()) { myEvaluateComboBox.getComboBox().setPopupVisible(false); } else { addExpressionResultNode(); } }