List of utility methods to do Swing Cursor
void | showDefaultCursorOnWindow(Component caller) show Default Cursor On Window showDefaultCursor(caller, true); |
void | startWaitCursor(JComponent component) start Wait Cursor RootPaneContainer root = ((RootPaneContainer) component.getTopLevelAncestor()); root.getGlassPane().setCursor(WAIT_CURSOR); root.getGlassPane().addMouseListener(CLICK_CONSUMER); root.getGlassPane().setVisible(true); root.getRootPane().validate(); |
void | startWaitCursor(JComponent component) Sets the wait (hourglass) mouse cursor for an application containing component .
RootPaneContainer root = (RootPaneContainer) component.getTopLevelAncestor(); root.getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); root.getGlassPane().addMouseListener(noopMouseAdapter); root.getGlassPane().setVisible(true); |
void | waitCursorOff(Component comp) Turns the waits cursor off. if (glassPaneCursor != null) {
Component gp = getGlassPane(comp);
gp.setVisible(glassPaneVisible);
gp.setCursor(glassPaneCursor);
glassPaneVisible = false;
glassPaneCursor = null;
|