Forums Register Login

wait cursor question

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Moving this to the Swing / JFC / AWT forum...
+Pie Number of slices to send: Send
The same question was asked here, so I'm closing this one.
You got style baby! More than this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


Reply locked
This thread has been viewed 1181 times.
Similar Threads
unable to change the cursor to string.
Set Wait Cursor
Cursor
NX: Server GUI
What is the expected behaviour of the cursor when a dialog appears?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:17:32.