This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jdk1.6 setCursor() with EventQueque thread showing Hourglass on parent window after closing frame

 
jaibardhan Ruwari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In our application we using swing cursor when processing data using below snippet code in parent-child window.

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));
}

Code reset cursor back to default after logic processing without any exception.

But after closing this child frame by close event or clicking some control on this frame, when it comes into parent window its show hourgalss instead of default(pointer).


1)This type of behaviour of frame shown only when opening frame over Model Layer but work fine in case of opeing over default layer .

2) When using jdk 1.6

If we explicitly set cursor to default at closing or other event even then it shows hourglass cursor.

Please suggest.
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
 
jaibardhan Ruwari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl,
App having a main window with toolbar and menus etc.
Inside this main window there is another frame(JInternal frame), from where user can open different screens (frames).So its a Parent child relationship between the JInternal frames.

1) When open a window (JInternal Frame over Model Layer), we used the above cursor code for processing from busy to default cursor mode and work fine reset cusor back to default.
(pointer) after processing but when we close the frame by close button cursor comes back into the hourglass mode on parent window.
2) There are no such issue when we open same frames over Deafult Layer.
3) Issue over Model Layer only appears when using JDK1.6 but working fine in JDK1.5.

 
Rob Camick
Ranch Hand
Posts: 2583
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That description is NOT a SSCCE!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic