Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Mahek Gupta
- 10/17/19
- */
- import javafx.application.Application;
- import javafx.stage.Stage;
- import javafx.scene.paint.*;
- import javafx.scene.canvas.*;
- public class truck extends Application
- {
- @Override
- public void start(Stage stage) throws Exception
- {
- // set up window title and size
- GraphicsContext gc = JIGraphicsUtility.setUpGraphics(stage, "Truck", 700, 400);
- gc.setFill( Color.BLACK);
- gc.fillRect( 10, 10, 300, 200);
- gc.setFill( Color.BLUE);
- gc.fillRect( 200, 60, 110, 50);
- gc.setFill( Color.RED);
- gc.fillOval( 80, 180, 60, 60);
- gc.setFill( Color.RED);
- gc.fillOval( 200, 180, 60, 60);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement