Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

wait cursor question

 
Sabina Norderhaug
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
The same question was asked here, so I'm closing this one.
 
    Bookmark Topic Watch Topic
  • New Topic