Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5.  
  6. Shape myShape = new Shape();
  7.  
  8. JFrame f = new JFrame();
  9. f.setSize(600, 600);
  10. f.setContentPane(myShape);
  11. f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12.  
  13. myShape.draw(); //APPLICATION 1
  14. f.setVisible(true);
  15.  
  16. //APPLICATION 2
  17. System.out.println("Lower Right Corner. X: " + myShape.getXLowerRightCorner()
  18. + " Y: " + myShape.getYLowerRightCorner());
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement