Java Reference
In-Depth Information
Color.BLACK);
MenuBar menuBar = new MenuBar();
Menu menu = new Menu("Look and Feel");
// New Modena Look and Feel
MenuItem modenaLnf = new MenuItem("Modena");
modenaLnf.setOnAction(enableCss(STYLESHEET_MODENA,scene));
menu.getItems().add(modenaLnf);
// Old default, Caspian Look and Feel
MenuItem caspianLnf = new MenuItem("Caspian");
caspianLnf.setOnAction(enableCss(STYLESHEET_CASPIAN,
scene));
menu.getItems().add(caspianLnf);
menu.getItems().add(createMenuItem("Control
Style 1", "controlStyle1.css", scene));
menu.getItems().add(createMenuItem("Control
Style 2", "controlStyle2.css", scene));
menu.getItems().add(createMenuItem("Sky",
"sky.css", scene));
menuBar.getMenus().add(menu);
// stretch menu
menuBar.prefWidthProperty().bind(primaryStage.widthProperty());
// Left and right split pane
SplitPane splitPane = new SplitPane();
splitPane.prefWidthProperty().bind(scene.widthProperty());
splitPane.prefHeightProperty().bind(scene.heightProperty());
// Form on the right
GridPane rightGridPane = new MyForm();
GridPane leftGridPane = new
GridPaneControlPanel(rightGridPane);
VBox leftArea = new VBox(10);
Search WWH ::




Custom Search