Removed no Fullscreen code

This commit is contained in:
Michael-Jouanneau 2016-10-29 20:23:17 +02:00
parent d7340c255d
commit fb7d543bf6

View File

@ -11,19 +11,13 @@ public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
primaryStage.initStyle(StageStyle.UNIFIED);
primaryStage.initStyle(StageStyle.UNDECORATED);
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 900, 500));
primaryStage.show();
primaryStage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
if (newValue)
primaryStage.setMaximized(false);
});
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); // Close program if button is clicked
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close());
}
public static void main(String[] args) {
launch(args);
}