Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.* ;
- import java.applet.* ;
- public class graphics_methods extends Applet {
- String s1 =new String();
- Font f1 = new Font("Arial BLACK",Font.BOLD,20);
- public void paint(Graphics g){
- g.setFont(f1);
- g.setColor(Color.blue);
- g.drawString("Illustration of methods of Graphics", 200, 520);
- g.drawString(s1, 5, 540);
- g.fillRect(500, 15, 70, 90);
- g.drawRect(160, 5, 60, 60);
- g.drawOval(700, 140, 50, 150);
- g.setColor(Color.yellow);
- g.fillOval(700, 140, 50, 150);
- g.drawLine(380, 100, 200, 180);
- g.drawArc(400, 150, 180, 280, 90, 70);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement