FileDocCategorySizeDatePackage
PopupButtonFrame.javaAPI DocExample1871Mon Mar 24 02:03:32 GMT 1997None

PopupButtonFrame

public class PopupButtonFrame extends Frame

Fields Summary
Image
im
Window
w
Constructors Summary
PopupButtonFrame()

      
        super ("PopupButton Example");
        resize (250, 100);
        show();
        im = getToolkit().getImage ("rosey.jpg");
        MediaTracker mt = new MediaTracker (this);
        mt.addImage (im, 0);
        try {
            mt.waitForAll();
        } catch (Exception e) { e.printStackTrace(); }
    
Methods Summary
public static voidmain(java.lang.String[] args)

        Frame f = new PopupButtonFrame ();
    
public booleanmouseDown(java.awt.Event e, int x, int y)

        if (e.modifiers == Event.META_MASK) {
            w.move (location().x+x, location().y+y);
            w.show();
            return true;
        }
        return false;
    
public voidpaint(java.awt.Graphics g)

        if (im != null)
            g.drawImage (im, 20, 20, this);