PopupButtonFramepublic 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 void | main(java.lang.String[] args)
Frame f = new PopupButtonFrame ();
| public boolean | mouseDown(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 void | paint(java.awt.Graphics g)
if (im != null)
g.drawImage (im, 20, 20, this);
|
|