I have a Java Desktop Application with JavaFX 2 in it and in my FX I\'ve got a TabPane. I want to set the default tab. In other words I want to set a tab as selected. I found th
To continue with Menai's answer heres how to refocus the opened tab/TabPane.
SingleSelectionModel selectionModel = TabPane.getSelectionModel(); if(!Tabpane.getTabs().contains(tabName)) { TabPane.getTabs().add(tabName); selectionModel.select(tabPane); } else { selectionModel.select(tabPane); }