package src;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class VirtualGameShelf extends Application {
    public static void main(String[] args) {
        // Automatic VM reset, thanks to Joseph Rachmuth.
        try {
            launch(args);
            System.exit(0);
        }
        catch (Exception error) {
            error.printStackTrace();
            System.exit(0);
        }
    }

    @Override
    public void start(Stage mainStage) throws Exception {
        mainStage.setTitle("Virtual Game Shelf");

        BorderPane root = new BorderPane();
        Scene mainScene = new Scene(root);
        mainStage.setScene(mainScene);

        mainStage.show();
    }
}

@@ -64,19 +64,334 @@
 afx.
-scene.Scene
+application.Platform;%0Aimport javafx.scene.Scene;%0Aimport javafx.scene.control.Menu;%0Aimport javafx.scene.control.MenuBar;%0Aimport javafx.scene.control.MenuItem;%0Aimport javafx.scene.control.SeparatorMenuItem;%0Aimport javafx.scene.input.KeyCode;%0Aimport javafx.scene.input.KeyCodeCombination;%0Aimport javafx.scene.input.KeyCombination
 ;%0Aim
@@ -1011,16 +1011,26 @@
 ene(root
+, 400, 200
 );%0A     
@@ -1076,24 +1076,1447 @@
     
-mainStage.show()
+MenuBar menuBar = generateMenuBar();%0A        root.setTop(menuBar);%0A%0A        mainStage.show();%0A    %7D%0A%0A    public MenuBar generateMenuBar()%0A    %7B%0A        MenuBar menuBar = new MenuBar();%0A%0A        Menu menuFile = new Menu(%22File%22);%0A        menuBar.getMenus().add(menuFile);%0A%0A        MenuItem menuItemNew = new MenuItem(%22New%22);%0A        //menuItemNew.setOnAction(e -%3E onNew());%0A        menuItemNew.setAccelerator( new KeyCodeCombination(KeyCode.N, KeyCombination.CONTROL_DOWN) );%0A        menuFile.getItems().add(menuItemNew);%0A%0A        MenuItem menuItemOpen = new MenuItem(%22Open%22);%0A        //menuItemOpen.setOnAction(e -%3E onOpen());%0A        menuItemOpen.setAccelerator( new KeyCodeCombination(KeyCode.O, KeyCombination.CONTROL_DOWN) );%0A        menuFile.getItems().add(menuItemOpen);%0A%0A        MenuItem menuItemSave = new MenuItem(%22Save%22);%0A        //menuItemSave.setOnAction(e -%3E onSave());%0A        menuItemSave.setAccelerator( new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_DOWN) );%0A        menuFile.getItems().add(menuItemSave);%0A%0A        SeparatorMenuItem separatorMenuItem = new SeparatorMenuItem();%0A        menuFile.getItems().add(separatorMenuItem);%0A%0A        MenuItem menuItemExit = new MenuItem(%22Exit%22);%0A        menuItemExit.setOnAction(e -%3E Platform.exit());%0A        //menuItemExit.setAccelerator( new KeyCodeCombination(KeyCode.F4, KeyCombination.ALT_DOWN) );%0A        menuFile.getItems().add(menuItemExit);%0A%0A        return menuBar
 ;%0A  

Add menuBar