Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • 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.

 
Rancher
Posts: 3205
29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That description is NOT a SSCCE!
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic