File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ test
Original file line number Diff line number Diff line change 1+ import javafx .application .Application ;
2+ import javafx .event .ActionEvent ;
3+ import javafx .event .EventHandler ;
4+ import javafx .scene .Scene ;
5+ import javafx .scene .control .Button ;
6+ import javafx .scene .layout .StackPane ;
7+ import javafx .stage .Stage ;
8+ public class Java_FX1 extends Application {
9+
10+ Button button ;
11+ public static void main (String args []) {
12+ launch (args );
13+
14+ }
15+
16+ @ Override
17+ public void start (Stage primaryStage ) throws Exception {
18+ primaryStage .setTitle ("Wills opening screen" );
19+
20+ button = new Button ();
21+ button .setText ("Hello Will" );
22+
23+ StackPane layout = new StackPane ();
24+ layout .getChildren ().add (button );
25+
26+ Scene scene = new Scene (layout , 300 , 300 );
27+ primaryStage .setScene (scene );
28+ primaryStage .show ();
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ import javafx .application .Application ;
2+ import javafx .event .ActionEvent ;
3+ import javafx .event .EventHandler ;
4+ import javafx .scene .Scene ;
5+ import javafx .scene .control .Button ;
6+ import javafx .scene .layout .StackPane ;
7+ import javafx .stage .Stage ;
8+ public class Java_FX2 extends Application {
9+
10+ // Handle User Events
11+
12+ Button button ;
13+ public static void main (String args []) {
14+ launch (args );
15+
16+ }
17+
18+ @ Override
19+ public void start (Stage primaryStage ) throws Exception {
20+ primaryStage .setTitle ("Wills opening screen" );
21+
22+ button = new Button ();
23+ button .setText ("Hello Will" );
24+
25+ StackPane layout = new StackPane ();
26+ layout .getChildren ().add (button );
27+
28+ Scene scene = new Scene (layout , 300 , 300 );
29+ primaryStage .setScene (scene );
30+ primaryStage .show ();
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments