Home arrow static arrow Java Programming [Archive] - jni mouse problem
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - jni mouse problem
This topic has 2 replies on 1 page.

Posts:1,206
Registered: 4/19/02
jni mouse problem  
Jun 22, 2004 7:59 AM



 
is someone is able to compile the dll from this thread
http://forum.java.sun.com/thread.jsp?forum=1&thread=324975

or have another way to be able to have the mouse x and y on the screen (even if not on the java program)

thx
 

Posts:3,055
Registered: 18/06/98
Re: jni mouse problem  
Jun 22, 2004 9:28 AM (reply 1 of 2)



 
If you could wait for JDK 1.5 you could use java.awt.MouseInfo.getPointerInfo().getLocation()


AWT
Release 1.5 features many AWT enhancements and bug fixes, including some that have often been requested by our customers. Most notably, the new MouseInfo class makes it possible to determine the mouse location on the desktop. New Window methods make it possible to specify the default location for a newly created window (or frame), appropriate to the platform. Another Window enhancement makes it possible to ensure that a window (or frame) is always on top. (This feature does not work for some window managers on Solaris/Linux.) In the area of data transfer, the new DropTargetDragEvent API allows the drop target to access transfer data during the drag operation.

java.awt.MouseInfo:
static PointerInfo getPointerInfo()
Returns a PointerInfo instance that represents the current location of the mouse pointer.
java.awt.PointerInfo:
Point getLocation()
Returns the Point that represents the coordinates of the pointer on the screen.
 

Posts:1,206
Registered: 4/19/02
Re: jni mouse problem  
Jun 22, 2004 10:05 AM (reply 2 of 2)



 
i think 1.5 beta is already out but i would like to find a way to do this with 1.4.2_04
i think the only solution would be to use jni
 
This topic has 2 replies on 1 page.