Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting cursor after a dialog closes

 
Manuel Godbert
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am experiencing problems trying to change the cursor.
My code first opens a JFrame, then a modal dialog is opened hiding a part of my JFrame and finally some long task is performed after the dialog closes.
I'd like to set a wait cursor on my JFrame before starting the long task but the modal dialog thing seems to stop it from working properly.
I know how I could process my long task in a separate thread or postpone my task in the Event Queue, but this heavy to code (my real long task can be interrupted many times by other dialog windows).

This is my test case:


Thanks to tell me if you know any workaround for my problem !
 
Manuel Godbert
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally I found out the solution, setting the cursor on the glasspane of the frame instead of the frame itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic