File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes wait cursor question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic
Author

wait cursor question

Sabina Norderhaug
Greenhorn

Joined: Oct 29, 2003
Posts: 6
I have wait cursor set in action_Performed as:
mLoginDialog.startWaitCursor(mLoginDialog.getRootPane());
where

/** Sets cursor for specified component to Wait cursor */
public static void startWaitCursor(JComponent component) {
RootPaneContainer root =
(RootPaneContainer)component.getTopLevelAncestor();
root.getGlassPane().setCursor(WAIT_CURSOR);
root.getGlassPane().setVisible(true);
}
/** Sets cursor for specified component to normal cursor */
public static void stopWaitCursor(JComponent component) {
RootPaneContainer root =
(RootPaneContainer)component.getTopLevelAncestor();
root.getGlassPane().setCursor(DEFAULT_CURSOR);
root.getGlassPane().setVisible(false);
}

When I click the button, I see default wait cursor (sandglass) no probelm. But if I move mouse outside this frame and then move it back, cursor changes to one of the resize cursor, so it looks like either horizontal or vertical 2 point arrow.
I wonder why this is happening and how can I avoid it?
Thank you,
Sabina
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

The same question was asked here, so I'm closing this one.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wait cursor question