-
Mouse position capturing
Hi All,
Can you help me following on matter?
I have tried to capture the mouse pointer's x, y coordinations from java applications when the mouse pointer is loss the focus from the java application(ex. out of the boundry of a JFrame). There is a method in windows platform with the windows api and JNI but I want to do this in a platform independent manner.
Best Regards,
Lakshitha
-
This is a place where the design decisions made with Java prevent you from doing what you say you want, outside of an API which exposes access to operating system functionality to you. What is going on outside of your program is outside of your program. There are only a limited avenues to communicate from the other programs to your Java program. JNI is one of them. Any of these avenues will be operating system dependent.
-
That mean, Can't we do it even in the java 5.0?
-
Even in Java 1.5. In order to read mouse coordinates you need to "listen" to the mouse pointer (interrupt then pass on). In order to do this outside of the Java Virtual Machine which is executing your program, you need to insert that listening process into the operating system. THAT is operating system specific.
Similar Threads
-
By eliminater in forum VB Classic
Replies: 0
Last Post: 09-01-2005, 07:15 AM
-
By Chris Eastwood in forum VB Classic
Replies: 4
Last Post: 03-28-2002, 01:26 PM
-
By Riki Fridrich in forum Web
Replies: 4
Last Post: 03-05-2001, 11:51 PM
-
By Ranger in forum VB Classic
Replies: 2
Last Post: 12-07-2000, 01:29 PM
-
By Ranger in forum VB Classic
Replies: 0
Last Post: 12-07-2000, 01:23 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks