dcsimg
Getting the location of the mouse cursor on screen
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stefan_Stefansson
Posted On:   Tuesday, May 6, 2003 03:03 AM

Is it possible to find out where the mouse cursor is located? I'm talking about some method that will give my the (x,y) location of the mouse cursor in screen coordinates, therefore I'm not able to set any mouse event listeners... I just want to find the location of the cursor, it may not have moved or been clicked.


Kind regards, Stefan.

Re: Getting the location of the mouse cursor on screen

Posted By:   Java_Buddy  
Posted On:   Sunday, June 8, 2003 08:05 PM

 

Hi!!
you can use

public void mouseEntered(MouseEvent me)
{

int x=me.getX();
int y=me.getY();
}


hOpe it works...Cheers.

About | Sitemap | Contact