FileDocCategorySizeDatePackage
mouseEvent.javaAPI DocExample1216Mon Mar 24 02:02:34 GMT 1997None

mouseEvent

public class mouseEvent extends Applet

Fields Summary
String
theString
Constructors Summary
Methods Summary
public synchronized java.lang.StringgetString()

        return theString;
    
public booleanmouseDown(java.awt.Event e, int x, int y)

        if (e.modifiers == Event.META_MASK) {
            setString ("Right Button Pressed");
        } else if (e.modifiers == Event.ALT_MASK) {
            setString ("Middle Button Pressed");
        } else {
            setString ("Left Button Pressed");
        }
        repaint ();
        return true;
    
public booleanmouseUp(java.awt.Event e, int x, int y)

        setString ("Press a Mouse Key");
        repaint ();
        return true;
    
public synchronized voidpaint(java.awt.Graphics g)

        g.drawString (theString, 20, 20);
    
public synchronized voidsetString(java.lang.String s)

          
        theString = s;