Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095024

[TabPane] Closing a tab results in visual artefacts in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8u20
    • 8u20
    • javafx
    • None

      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.

            jgiles Jonathan Giles
            msladecek Martin Sládeček
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: