Does anyone know how to access the index of the choice that we made from the ComboBox in JavaFX?
Well if you use a ChoiceBox instead of a ComboBox, you can access the choice by using the getValue() method in the ChoiceBox. We used that to get the id of the chick and then access the AnimalTrack by the id.
Thanks a lot. This should be helpful for our project
I believe you can do comboBox.getSelectionModel().getSelectedIndex() -- this is off the top of my head though, so you may want to check online for examples.
comboBox.getSelectionModel().getSelectedIndex()