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

TabPane doesn't respect order of TabPane.getTabs() list

XMLWordPrintable

      When updating the tabs in TabPane and passing a new list with already existing tabs, new tabs, (eventually in a different order), the order of the tabs in header may not match with the order of tabs in TabPane.getTabs().

      Below are 2 failing cases:

              Tab t1 = new Tab("t1");
              Tab t2 = new Tab("t2");
              Tab t3 = new Tab("t3");
              Tab t4 = new Tab("t4")
              Tab t5 = new Tab("t5");

              tabPane.getTabs().setAll(t1, t3, t5, t2, t4);
              tabPane.getTabs().setAll(t4, t3, t3, t2, t1); => FAILS

              tabPane.getTabs().clear();
              tabPane.getTabs().setAll(t1, t3, t5, t2, t4);
              tabPane.getTabs().setAll(t1, t4, t5);
              tabPane.getTabs().setAll(t5, t3, t4, t1, t2); => FAILS

      There are few more scenarios of failing cases,
      Which can be observed in TabPaneSkinHeaderOrderTest.java which will be ignored for now using this bug

            arapte Ambarish Rapte
            arapte Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: