private void setupTopPanel() {
        final Stage stage = view.getStage();
        // File > Load File
        view.topPanel.mItmLoadFile.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                FileChooser fileChooser = new FileChooser();
                if (blueJInterface != null) { fileChooser.setInitialDirectory(blueJInterface.getWorkingDirectory()); }
                FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter("FXML files (*.fxml)", "*.fxml");
                fileChooser.getExtensionFilters().add(filter);

                File file = fileChooser.showOpenDialog(view.getStage());

                openFile(file);
            }
        });
        // File > Save File
        view.topPanel.mItmSaveFile.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                saveFile();
            }
        });
        // File > Close
        view.topPanel.mItmClose.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                stage.close();
            }
        });
        // File > Make Full Screen
        view.topPanel.mItmFullScreen.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                if (stage.isFullScreen()) {
                    stage.setFullScreen(false);
                    view.topPanel.mItmFullScreen.setText(LabelGrabber.getLabel("fullscreen.enable.text"));
                } else {
                    stage.setFullScreen(true);
                    view.topPanel.mItmFullScreen.setText(LabelGrabber.getLabel("fullscreen.disable.text"));
                }
            }
        });

        //Add HistoryListener for the Undo/Redo menu items in the Edit menu
        historyManager.addHistoryListener(new HistoryListener() {
            @Override
            public void historyUpdated(final HistoryUpdate historyUpdate) {
                //Undo MenuItem
                if (historyUpdate.canUndo()) {
                    view.topPanel.mItmUndo.setDisable(false);
                    view.topPanel.mItmUndo.setOnAction(new EventHandler<ActionEvent>() {
                        @Override
                        public void handle(ActionEvent actionEvent) {
                            historyManager.updateTo(historyUpdate.getCurrentIndex() - 1);
                        }
                    });
                } else {
                    view.topPanel.mItmUndo.setDisable(true);
                }

                //Redo MenuItem
                if (historyUpdate.canRedo()) {
                    view.topPanel.mItmRedo.setDisable(false);
                    view.topPanel.mItmRedo.setOnAction(new EventHandler<ActionEvent>() {
                        @Override
                        public void handle(ActionEvent actionEvent) {
                            historyManager.updateTo(historyUpdate.getCurrentIndex() + 1);
                        }
                    });
                } else {
                    view.topPanel.mItmRedo.setDisable(true);
                }
            }
        });

        //Edit Menu > Delete button functionality
        selectionManager.addSelectionListener(new SelectionListener() {
            @Override
            public void updateSelected(final GObject gObject) {
                view.topPanel.mItmDelete.setDisable(false);
                view.topPanel.mItmDelete.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent actionEvent) {
                        view.middleTabPane.viewPane.getChildren().remove(gObject);
                        selectionManager.clearSelection();
                        historyManager.addHistory(new HistoryItem() {
                            @Override
                            public void restore() {
                                view.middleTabPane.viewPane.getChildren().remove(gObject);
                                selectionManager.clearSelection();
                            }

                            @Override
                            public void revert() {
                                view.middleTabPane.viewPane.getChildren().add((Node) gObject);
                                selectionManager.updateSelected(gObject);
                            }

                            @Override
                            public String getAppearance() {
                                return gObject.getFieldName() + " deleted";
                            }
                        });
                    }
                });
                view.topPanel.mItmClearAll.setDisable(false);
                view.topPanel.mItmClearAll.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent actionEvent) {
                        final List<Node> list = new ArrayList<>();
                        list.addAll(view.middleTabPane.viewPane.getChildren());
                        view.middleTabPane.viewPane.getChildren().clear();
                        selectionManager.clearSelection();

                        historyManager.addHistory(new HistoryItem() {
                            @Override
                            public void restore() {
                                for (Node n : list) {
                                    view.middleTabPane.viewPane.getChildren().remove(n);
                                }
                                selectionManager.clearSelection();
                            }

                            @Override
                            public void revert() {
                                for (Node n : list) {
                                    view.middleTabPane.viewPane.getChildren().add(n);
                                    selectionManager.updateSelected((GObject) n);
                                }
                            }

                            @Override
                            public String getAppearance() {
                                return ("Clear All");
                            }
                        });
                    }
                });
            }

            @Override
            public void clearSelection() {
                view.topPanel.mItmDelete.setDisable(true);
                view.topPanel.mItmClearAll.setDisable(true);
            }
        });

        // View > Show Hierarchy
        view.topPanel.mItmHierarchy.setOnAction(
                new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                if (view.topPanel.mItmHierarchy.isSelected()) {
                    view.leftPanel.getItems().add(view.leftPanel.hierarchyTitledPane);
                    view.leftPanel.setDividerPosition(0, 0.6);
                } else {
                    view.leftPanel.getItems().remove(view.leftPanel.hierarchyTitledPane);
                }
            }
        });
        // View > Show History
        view.topPanel.mItmHistory.setOnAction(
                new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                toggleHistory();
            }
        });
        
        view.topPanel.mItmAbout.setOnAction(
                new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                Stage stage = new Stage();
                GridPane pane = new GridPane();
                Label label = new Label(LabelGrabber.getLabel("about.text"));
                label.setMaxWidth(300);
                label.setWrapText(true);
                label.setFont(new Font(18));
                label.setTextAlignment(TextAlignment.CENTER);
                ImageView imageview = new ImageView(new Image(getClass().getResourceAsStream("/bdl/icons/BlueJ_Orange_64.png")));
                pane.add(imageview, 1, 1);
                pane.add(label, 1, 2);
                GridPane.setHalignment(imageview, HPos.CENTER);
                stage.setScene(new Scene(pane));
                stage.show();
            }
        });
        
    }