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

TabPane: NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.1
    • fx2.1
    • javafx
    • Win7/JDK6/b14

      To reproduce on attached app:
       - resize application window wide enough to not shrink a TabPane;
       - select any tab;
       - resize application window narrow enough to shrink a TabPane;
       - select any tab;
       - press drop-down menu menu button

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.ContextMenu;
      import javafx.scene.control.Label;
      import javafx.scene.control.MenuItem;
      import javafx.scene.control.Tab;
      import javafx.scene.control.TabPane;
      import javafx.scene.input.KeyCombination;
      import javafx.stage.Stage;

      public class Main extends Application {

          @Override public void start(Stage stage) {
              TabPane tabs = new TabPane();
              for (int i=0; i<7; i++) {
                  Label label = new Label("Label" + i);
                  Tab tab = new Tab("Tab" + i);
                  tab.setContent(label);
                  tabs.getTabs().add(tab);
              }
              stage.setScene(new Scene(tabs));
              stage.sizeToScene();
              stage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }

      java.lang.NullPointerException
              at com.sun.javafx.scene.control.skin.TabPaneSkin$TabControlButtons$1.handle(TabPaneSkin.java:1297)
              at com.sun.javafx.scene.control.skin.TabPaneSkin$TabControlButtons$1.handle(TabPaneSkin.java:1295)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
              at javafx.event.Event.fireEvent(Event.java:171)
              at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:2649)
              at javafx.scene.Scene$ClickGenerator.access$6200(Scene.java:2583)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:2904)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:2689)
              at javafx.scene.Scene$MouseHandler.access$1300(Scene.java:2655)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1281)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1913)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:215)
              at com.sun.glass.ui.View.handleMouseEvent(View.java:493)
              at com.sun.glass.ui.View.notifyMouse(View.java:871)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
              at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
              at java.lang.Thread.run(Thread.java:662)

            kwwong Kinsley Wong (Inactive)
            ogb Oleg Barbashov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: