Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

hourglass issue with model dialog


Back to:
www.javaworld.com/javaworld/javatips/jw-javatip87.html
.

Hi Kyle,
We implemented same logic for EventQueque and Timer class with startTimer() and stopTimer()through dispatchEvent() method as given above.
Set cursor explicitly to wait and pointer via setCursor() method managed by dispatchevent using below code snippet....
------------------------------------------
try{
component.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// Code for processing
// code
}catch (Exception e) {
e.printStackTrace();
}finally{
component.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
-----------------------------------------
We used this code at opening of a JInternalFrame over Model Dialog and its work fine reset cursor back to default after code processing.
But shows cursor back to hourglass on parent window when we close this frame by 'X' button.
Cursor showing this wrong behavior when opening it over model layer but works fine over default layer.
We explicitly call stopTimer() method or set It to default cursor in different areas but no success.
Please advise.....

Your rating: None