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

[MenuBarSkin] NullPointerException from MenuBarSkin constructor if MenuBar is not in a scene

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8u20
    • javafx
    • None

      MenuBarSkin's constructor gets NPE from this:

      import com.sun.javafx.scene.control.skin.MenuBarSkin;
      import javafx.application.Application;
      import javafx.scene.control.MenuBar;
      import javafx.stage.Stage;

      public class HelloMenu extends Application {

          @Override public void start(Stage stage) {
              MenuBar menuBar = new MenuBar();
              MenuBarSkin menuBarSkin = new MenuBarSkin(menuBar);
          }
          public static void main(String[] args) {
              Application.launch(args);
          }
      }

            jgiles Jonathan Giles
            dgrieve David Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: