Removed no Fullscreen code
This commit is contained in:
parent
d7340c255d
commit
fb7d543bf6
@ -11,19 +11,13 @@ public class Main extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception{
|
public void start(Stage primaryStage) throws Exception{
|
||||||
primaryStage.initStyle(StageStyle.UNIFIED);
|
primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||||
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
|
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
|
||||||
primaryStage.setTitle("Hello World");
|
primaryStage.setTitle("Hello World");
|
||||||
primaryStage.setScene(new Scene(root, 900, 500));
|
primaryStage.setScene(new Scene(root, 900, 500));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
primaryStage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
|
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close());
|
||||||
if (newValue)
|
|
||||||
primaryStage.setMaximized(false);
|
|
||||||
});
|
|
||||||
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); // Close program if button is clicked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user