Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

NX: Mouse cursor

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
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
reply
    Bookmark Topic Watch Topic
  • New Topic