JavaFX TabPane: How to set the selected tab
The SelectionModelis the right approach. You can get the default from your TabPane or assign your own implementation by using setSelectionModel(…). The default model should be good enough for the beginning. SingleSelectionModel<Tab> selectionModel = tabPane.getSelectionModel(); Once you stored it in some local variable, you have different options to select a tab. selectionModel.select(tab); //select by object … Read more