Advertisement
Guest User

American Flag

a guest
Mar 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1. import javafx.application.Application;
  2. import javafx.collections.ObservableList;
  3. import javafx.scene.Scene;
  4. import javafx.scene.layout.Pane;
  5. import javafx.scene.paint.Color;
  6. import javafx.scene.shape.Polygon;
  7. import javafx.scene.shape.Rectangle;
  8. import javafx.stage.Stage;
  9.  
  10. public class AmericanFlag extends Application {
  11.     @Override // Override the start method in the Application class
  12.     public void start(Stage primaryStage) {
  13.         final double PANEWIDTH = 589;
  14.         final double PANEHEIGHT = 310;
  15.  
  16.         // Create a scene and place it in the stage
  17.         Scene scene = new Scene(new FlagPane(), PANEWIDTH, PANEHEIGHT);
  18.         primaryStage.setTitle("Red Stripes");
  19.         primaryStage.setScene(scene);
  20.         primaryStage.setResizable(true);
  21.         primaryStage.show();
  22.     }
  23.  
  24.     /**
  25.      * The main method is only needed for the IDE with limited JavaFX support.
  26.      * Not needed for running from the command line.
  27.      */
  28.     public static void main(String[] args) {
  29.         launch(args);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement