How to check if any item is selected in JavaFX ComboBox
You can use
boolean isMyComboBoxEmpty = myComboBox.getSelectionModel().isEmpty();
Which also works, if you have a null
item among the ComboBox
items.
So I found a simple way:
boolean isMyComboBoxEmpty = (myComboBox.getValue() == null);