Run the following sample:
public class App extends Application {
@Override
public void start(Stage stage) {
TabPane pane = new TabPane();
final Tab disabled = new Tab("Disabled");
disabled.setDisable(true);
pane.getTabs().add(disabled);
pane.getTabs().addAll(new Tab("ABCABCABCABC"), new Tab("ABC"));
Scene scene = new Scene(pane,200,200);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
When closing the second tab, the animation moves the tabs incorrectly and the third tab is visible only partially afterwards.
When changing the name of the second tab to some longer name (like if both tabs are called ""ABCABCABCABC"), the problem is no longer visible. But in this case, closing *both* tabs makes the disabled tab invisible.
public class App extends Application {
@Override
public void start(Stage stage) {
TabPane pane = new TabPane();
final Tab disabled = new Tab("Disabled");
disabled.setDisable(true);
pane.getTabs().add(disabled);
pane.getTabs().addAll(new Tab("ABCABCABCABC"), new Tab("ABC"));
Scene scene = new Scene(pane,200,200);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
When closing the second tab, the animation moves the tabs incorrectly and the third tab is visible only partially afterwards.
When changing the name of the second tab to some longer name (like if both tabs are called ""ABCABCABCABC"), the problem is no longer visible. But in this case, closing *both* tabs makes the disabled tab invisible.
- relates to
-
JDK-8093017 HelloTabPane: white rectangle in the tab header
- Resolved