Advertisement
Guest User

dfas

a guest
Oct 21st, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import java.awt.* ;
  2. import java.applet.* ;
  3.  
  4. public class graphics_methods extends Applet {
  5. String s1 =new String();
  6. Font f1 = new Font("Arial BLACK",Font.BOLD,20);
  7. public void paint(Graphics g){
  8. g.setFont(f1);
  9. g.setColor(Color.blue);
  10. g.drawString("Illustration of methods of Graphics", 200, 520);
  11. g.drawString(s1, 5, 540);
  12. g.fillRect(500, 15, 70, 90);
  13. g.drawRect(160, 5, 60, 60);
  14. g.drawOval(700, 140, 50, 150);
  15. g.setColor(Color.yellow);
  16. g.fillOval(700, 140, 50, 150);
  17. g.drawLine(380, 100, 200, 180);
  18. g.drawArc(400, 150, 180, 280, 90, 70);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement