FileDocCategorySizeDatePackage
Blob1.javaAPI DocExample1014Thu Feb 03 08:18:02 GMT 2000None

Blob1

public class Blob1 extends Frame

Fields Summary
private int
x
private int
y
Constructors Summary
public Blob1()

  setTitle( "Blob1" ); 

      setSize( 300, 300 );

      

      addMouseListener( new MouseAdapter() {

         public void mousePressed( MouseEvent e )

         {  x = e.getX();

            y = e.getY();

            repaint();

         }

      });

      

      addWindowListener( new WindowAdapter() {

         public void windowClosing( WindowEvent e )

         {  System.exit(0);

         }

      });

      

      setVisible( true ); 

   
Methods Summary
public static voidmain(java.lang.String[] args)

  new Blob1();

   
public voidpaint(java.awt.Graphics g)


   

        

     g.fillOval( x, y, 10, 10 );

   
public voidupdate(java.awt.Graphics g)

  paint( g );