Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- public class Lab04G_BIL
- {
- public static void main(String args[])
- {
- GfxApp gfx = new GfxApp();
- gfx.setSize(900,700);
- gfx.addWindowListener(new WindowAdapter(){public void
- windowClosing(WindowEvent e){System.exit(0);}});
- gfx.show();
- }
- }
- class GfxApp extends Frame
- {
- public void paint(Graphics g)
- {
- g.drawLine(145,145,230,40);
- g.drawLine(295,145,230,40);
- g.drawLine(150,100,230,40);
- g.drawLine(145,145,295,145);
- g.drawLine(145,145,150,100);
- g.fillOval(500,242,200,200);
- g.setColor(Color.white);
- g.fillOval(515,251,175,175);
- g.setColor(Color.blue);
- g.fillOval(529,260,150,150);
- g.setColor(Color.red);
- g.fillOval(545,269,125,125);
- g.setColor(Color.yellow);
- g.fillOval(575,295,75,75);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement