i = getImage (getDocumentBase(), "ora-icon.gif"); pg = new PixelGrabber (i, 0, 0, -1, -1, false); pg.startGrabbing(); enableEvents (AWTEvent.MOUSE_EVENT_MASK);
g.drawImage (i, 10, 10, this);
if (e.getID() == MouseEvent.MOUSE_CLICKED) { System.out.println ("Status: " + pg.getStatus()); System.out.println ("Width: " + pg.getWidth()); System.out.println ("Height: " + pg.getHeight()); System.out.println ("Pixels: " + (pg.getPixels() instanceof byte[] ? "bytes" : "ints")); System.out.println ("Model: " + pg.getColorModel()); } super.processMouseEvent (e);