views:

27

answers:

2

I am writing a an swt app that has an embeded GLCanvas and I wanted to be able to find out the size of the current cursor, is this possible? And if I cannot get it from JOGL then is it possible from either swt or awt?

A: 

If by size you mean pixel dimensions, you can have a look at Toolkit.getBestCursorSize(int,int) to check the supported cursor sizes on the platform.

suihock
I looked into that method and on windows it is always returning 32x32 when the default cursor size is 12x21
Yanamon
A: 

Getting the cursor size is not generally useful, since much of a cursor may be transparent. I'm also unclear as to why you mention JOGL. The JOGL library doesn't interact with the cursor, as far as I know.

DJClayworth
I was adding a tool tip type of widget below the mouse so I needed to know how far below the current mouse position to pop up the text. Even though most of the cursor is transparent it seems that the windows is able to put tooltips right below the mouse so surely it is available somewhere, maybe just not in java? Or maybe the windows tooltip is actually looking at the actual pixels of the cursor to determine what is transparent and what is not?
Yanamon
Right below the cursor or right below the mouse position? Obviously the system knows the cursor "hot spot" which is the mouse position.
DJClayworth