-
Bug
-
Resolution: Fixed
-
P4
-
8
When TabPane tabMaxWidth is specified greater than tabs actual width, then close button is hidden.
public class TabPaneCloseBug extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
final TabPane tabs = new TabPane();
tabs.setTabClosingPolicy(TabPane.TabClosingPolicy.ALL_TABS);
tabs.getTabs().setAll(new Tab("A"),new Tab("B"),new Tab("C"));
tabs.setTabMaxWidth(200);//remove this line to see close buttons
//tabs.setTabMinWidth(200); //or make tabs wider to see close buttons
Scene scene = SceneBuilder.create()
.width(1000).height(700)
.root(tabs).build();
primaryStage.setScene(scene);
primaryStage.setTitle("TabPaneCloseBug");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
public class TabPaneCloseBug extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
final TabPane tabs = new TabPane();
tabs.setTabClosingPolicy(TabPane.TabClosingPolicy.ALL_TABS);
tabs.getTabs().setAll(new Tab("A"),new Tab("B"),new Tab("C"));
tabs.setTabMaxWidth(200);//remove this line to see close buttons
//tabs.setTabMinWidth(200); //or make tabs wider to see close buttons
Scene scene = SceneBuilder.create()
.width(1000).height(700)
.root(tabs).build();
primaryStage.setScene(scene);
primaryStage.setTitle("TabPaneCloseBug");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}