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);
}
}
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);
}
}
- relates to
-
JDK-8095020 MenuBar.snapshot() can buy you a NullPointerException
- Closed