I read AutoComplete ComboBox in JavaFX but the answer with the most upvotes uses Lambda expressions.
In my project i can't use them, so I would like to ask if someone could provide the code without lambda expressions.
Here are the two parts of the code with lambda expressions:
1)
comboBox.getEditor().focusedProperty().addListener(observable -> {
if (comboBox.getSelectionModel().getSelectedIndex() < 0) {
comboBox.getEditor().setText(null);
}
});
2)
comboBox.addEventHandler(KeyEvent.KEY_PRESSED, t -> comboBox.hide());