Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. /*
  2. Mahek Gupta
  3. 10/17/19
  4. */
  5.  
  6. import javafx.application.Application;
  7. import javafx.stage.Stage;
  8. import javafx.scene.paint.*;
  9. import javafx.scene.canvas.*;
  10.  
  11.  
  12.  
  13. public class truck extends Application
  14. {
  15.  
  16. @Override
  17. public void start(Stage stage) throws Exception
  18. {
  19. // set up window title and size
  20. GraphicsContext gc = JIGraphicsUtility.setUpGraphics(stage, "Truck", 700, 400);
  21.  
  22. gc.setFill( Color.BLACK);
  23. gc.fillRect( 10, 10, 300, 200);
  24. gc.setFill( Color.BLUE);
  25. gc.fillRect( 200, 60, 110, 50);
  26. gc.setFill( Color.RED);
  27. gc.fillOval( 80, 180, 60, 60);
  28. gc.setFill( Color.RED);
  29. gc.fillOval( 200, 180, 60, 60);
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement