You are here: irt.org | FAQ | Java | Q4034 [ previous next ]
That's a tricky one, because applets dont have explicit frames. But using a bit of sneaky code you have to get the frame object that contains the applet! use:
Object theFrame = getParent(); While (! (theFrame instanceof Frame)); theFrame=((Component)theFrame).getParent();
theFrame will finally contain a Frame object now simply do:
theFrame.WAIT_CURSOR
to get the hour glass cursor.
Audrius Meskauskas writes:
Since JDK1.1 use:
Component.setCursor(new Cursor(Cursor.WAIT_CURSOR));