List of usage examples for javax.swing JRootPane validate
public void validate()
From source file:com.monead.semantic.workbench.SemanticWorkbench.java
/** * Sets the mouse pointer. If the supplied parameter is true then the wait * cursor (usually an hourglass) is displayed. otherwise the system default * cursor is displayed.// w w w .ja v a 2 s .c om * * @param wait * Whether to display the system default wait cursor */ private void setWaitCursor(boolean wait) { final JRootPane rootPane = getRootPane(); final Component glassPane = rootPane.getGlassPane(); if (wait) { final Cursor cursorWait = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); rootPane.setCursor(cursorWait); glassPane.setCursor(cursorWait); glassPane.setVisible(true); } else { final Cursor cursorDefault = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR); glassPane.setVisible(false); glassPane.setCursor(cursorDefault); rootPane.setCursor(cursorDefault); } glassPane.invalidate(); rootPane.validate(); }