To create my custom cursor, all I had to do was create a JComponent, and then override the paintComponent method, as shown in the class named AlsXYMouseLabelComponent below. ![]() ![]() My Java custom mouse cursor to display the mouse x/y coordinatesĬreating a custom Java mouse cursor like this turned out to be pretty simple, though it definitely helps to have a great book like Filthy Rich Clients at your disposal. I can't figure the right way to word that, so it may not make sense, but hopefully this picture of what I've done will help demonstrate my custom Java mouse cursor: Java mouse FAQ: How do I create a custom Java mouse cursor (mouse pointer)?įor my Java/Swing XY mouse position/coordinates application I finally dug into Swing and figured out how to create a Java mouse cursor that shows the X/Y position (coordinates) of the mouse cursor at any moment in time. A $2 donation will help keep this site running!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |