Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javafx.application.Application;
- import javafx.collections.ObservableList;
- import javafx.scene.Scene;
- import javafx.scene.layout.Pane;
- import javafx.scene.paint.Color;
- import javafx.scene.shape.Polygon;
- import javafx.scene.shape.Rectangle;
- import javafx.stage.Stage;
- public class AmericanFlag extends Application {
- @Override // Override the start method in the Application class
- public void start(Stage primaryStage) {
- final double PANEWIDTH = 589;
- final double PANEHEIGHT = 310;
- // Create a scene and place it in the stage
- Scene scene = new Scene(new FlagPane(), PANEWIDTH, PANEHEIGHT);
- primaryStage.setTitle("Red Stripes");
- primaryStage.setScene(scene);
- primaryStage.setResizable(true);
- primaryStage.show();
- }
- /**
- * The main method is only needed for the IDE with limited JavaFX support.
- * Not needed for running from the command line.
- */
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement