Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Mouse cursor

 
Flavio Nobili
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
In the client GUI I've made the mouse cursor, when trying to connect to the database, show a waiting cursor so that the user can know that the application is trying to connect. For that, I've used the following code:

But, it hasn't been working, I mean, the cursor is changed, but if the mouse is moved it returns to the default cursor. What is wrong?
Regards,
Fl�vio.
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fl�vio,
Originally posted by Fl�vio Fran�a:

But, it hasn't been working, I mean, the cursor is changed, but if the mouse is moved it returns to the default cursor. What is wrong?

For which Component object is the setCursor being called? Is it possible that the cursor is being changed for a small Component (small in the sense that it does not encompass the entire window), and when the cursor is moved off of that small Component, then it reverts back to the old cursor. If you think this is the problem maybe you can change the cursor for the top-level Component (maybe the JFrame?).
 
Flavio Nobili
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
I think it's not the problem , I've set the cursor for the main frame.
This is the whole method:


Regards,
Fl�vio.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic