esanits
esanits

Reputation: 197

Java change cursor

is there any way to change the cursor in Java at all, not just for one JComponent?

I need this because I want the cursor to change, when your mouse leaves the JFrame, so there is no JComponent in the background.

Thanks for your help!

esanits

Upvotes: 2

Views: 2207

Answers (2)

Paŭlo Ebermann
Paŭlo Ebermann

Reputation: 74800

If you want to change the system cursor (i.e. when the cursor is outside your application), this is the responsibility of your system. I don't think you can change the system's settings from Java in a platform-independent way.

Upvotes: 0

Suraj Chandran
Suraj Chandran

Reputation: 24801

Setting cursor on your JFrame or top level window should do the trick

Upvotes: 2

Related Questions