Saturday 15 February 2014

java - In Swing, is there a way to extract a predefined mouse cursor Image from the toolkit? -



java - In Swing, is there a way to extract a predefined mouse cursor Image from the toolkit? -

i'd create custom help cursor "badging" built-in default mouse cursor question mark when user hovering on object can clicked context-sensitive help. i'd work nicely across platforms/look-and-feels (to consistent white windows mouse , black mac mouse, instance.) there way cursor image current toolkit generate combined image set cursor?

this question points out info can't gotten cursor object. there's comment there suggested fishing around in jre, i've tried bit: there , in google images, didn't find straightforwardly accessible graphics files plunder

an alternative add together mousemoved listener , draw manually little right of cursor (on parent, suppose, avoid clipping @ borders?) bit concerned overhead, , in initial explorations, looking complicated. i'd take other suggestions finding or making nice help cursor well. (the hand best built-in, doesn't "help" question-mark.)

i'm not sure best solution in case, because built-in mouse cursor should best. anyway can utilize mouse listeners , draw on glasspane according mouse position. here's glasspane drawing example.

java swing mouse-cursor

No comments:

Post a Comment