Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.awt.*;
  2. import javax.swing.*;
  3.  
  4. public class graphics extends JFrame{
  5.  
  6.  
  7. public graphics(){
  8.  
  9. super();
  10. }
  11.  
  12.  
  13. public void paint(Graphics g){
  14. g.drawLine(10,10,150,150);
  15. g.drawArc(30, 30, 45, 45, 100, 100);
  16. g.drawRect(175, 175, 200, 200);
  17. g.drawString("Hej!", 75, 75);
  18. g.drawOval(175, 175, 200, 200);
  19.  
  20. }
  21.  
  22. public static void main(String arg[]){
  23.  
  24. graphics frame = new graphics();
  25.  
  26.  
  27. frame.setSize(1000,1000);
  28.  
  29.  
  30. frame.setVisible(true);
  31.  
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement