import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.control.Menu; import javafx.scene.control.MenuBar; import javafx.scene.control.MenuItem; import javafx.scene.layout.BorderPane; import javafx.stage.Stage; import javafx.stage.StageStyle; public class MenuBarTest extends Application { @Override public void start(Stage pStage) throws Exception { pStage.initStyle(StageStyle.UNDECORATED); pStage.setTitle("MenuBar-Test"); BorderPane root = new BorderPane(); root.setStyle("-fx-border-color: black"); MenuBar menuBar = new MenuBar(); Menu file = new Menu("File"); MenuItem quit = new MenuItem("Quit"); file.getItems().add(quit); menuBar.getMenus().add(file); // just change Center & Top and everything will work fine root.setCenter(menuBar); root.setTop(new Label("Test")); pStage.setScene(new Scene(root, 250, 250)); pStage.show(); } public static void main(String[] args) { Application.launch(args); } }