How to switch through tabs programmatically in JavaFX

前端 未结 1 470
我在风中等你
我在风中等你 2020-12-19 03:52

Only one tab is visible at a time. The user selects the one using mouse/keyboard. Suppose, there are three tabs on TabPane and there is a button on first. When user press th

1条回答
  •  有刺的猬
    2020-12-19 04:40

    Try

    tabPane.getSelectionModel().select(index);
    

    or

    tabPane.getSelectionModel().select(someTab);
    

    or

    tabPane.getSelectionModel().selectNext();
    

    Or...

    0 讨论(0)
提交回复
热议问题