Java examples for JavaFX:TabPane
add And Active JavaFX Tab
/**//from w ww. j a v a2 s. c om * Author: obullxl@gmail.com * Copyright (c) 2004-2013 All Rights Reserved. */ //package com.java2s; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; public class Main { public static void addAndActiveTab(TabPane tabpane, Tab tab) { if (tab == null) { return; } if (tabpane == null) { return; } tabpane.getTabs().add(tab); tabpane.getSelectionModel().select(tab); } }