File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed
Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 22 requires java .desktop ;
33 requires javafx .controls ;
44 requires javafx .fxml ;
5+ requires javafx .base ;
6+ requires javafx .graphics ;
57
68 opens org .idaesbasic to javafx .fxml ;
79 opens org .idaesbasic .controllers to javafx .fxml ;
Original file line number Diff line number Diff line change 11package org .idaesbasic ;
22
33import javafx .application .Application ;
4+ import javafx .application .Platform ;
5+ import javafx .event .EventHandler ;
46import javafx .fxml .FXMLLoader ;
57import javafx .scene .Parent ;
68import javafx .scene .Scene ;
79import javafx .scene .image .Image ;
810import javafx .stage .Stage ;
11+ import javafx .stage .WindowEvent ;
912
1013public class Idaesbasic extends Application {
1114
@@ -15,8 +18,15 @@ public void start(Stage stage) {
1518 Parent root = FXMLLoader .load (getClass ().getResource ("/fxml/MainView.fxml" ));
1619 Scene scene = new Scene (root , 640 , 480 );
1720 stage .setScene (scene );
18- stage .setTitle ("Idaesbasic - 0.8 - Alpha" );
21+ stage .setTitle ("Idaesbasic - Main window - 0.8.0 - Alpha" );
1922 stage .setMaximized (true );
23+ stage .setOnCloseRequest (new EventHandler <WindowEvent >() {
24+ @ Override
25+ public void handle (WindowEvent t ) {
26+ Platform .exit ();
27+ System .exit (0 );
28+ }
29+ });
2030 stage .getIcons ().add (new Image (Main .class .getResourceAsStream ("/icon.png" )));
2131 stage .show ();
2232 } catch (Exception e ) {
Original file line number Diff line number Diff line change 11package org .idaesbasic ;
22
33public class Main {
4-
54 public static void main (String [] args ) {
65 Idaesbasic .main (args );
76 }
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ void openNewWindow(ActionEvent event) {
200200 Scene scene = new Scene (root , 640 , 480 );
201201 Stage stage = new Stage ();
202202 stage .setScene (scene );
203- stage .setTitle ("Idaes - 0.8 - Alpha" );
203+ stage .setTitle ("Idaesbasic - Child window - 0.8.0 - Alpha" );
204204 stage .show ();
205205 } catch (IOException e ) {
206206 e .printStackTrace ();
You can’t perform that action at this time.
0 commit comments