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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
      None

      Description

      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);
          }
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: