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

Tab close event TabPane reference is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P5 P5
    • 9
    • 8u20
    • javafx
    • None

      An EventHandler can be attached to a tab via Tab.setOnClosed(EventHandler)

      When the close event is fired the handler receives as source a tab which Tab.getTabPane() method returns null instead of the TabPane the Tab is attached to. Of course after the close handling null could be an expected result, but not at notification time.

      public void handle(final Event event) {
       System.out.println(((Tab)event.getSource).getTabPane());
      }

      Displays "null"!

            msladecek Martin Sládeček
            jclementjfx Jean-Philippe CLEMENT (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: