Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fivetoadsloth

macrumors 65816
Original poster
Aug 15, 2006
1,035
0
im trying to write a little app in java is there a way to tell it to check the mouse coordinates now and than agin in foour miuntes and if they have display a pop up message, and if they havnt do nothing?
thanks alot
 

fivetoadsloth

macrumors 65816
Original poster
Aug 15, 2006
1,035
0
well i asked a friend and he said that this is alot harder than i though and he didnt know. Sorry, but if youd have any ideas, or even better, know how! could you tell me? thanks.
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
You should probably create a window containing a Swing component, such as JPanel, and get the coordinates from it.
 
MouseXXListener

I'm not sure that for your purpose you really needs to know the coordinates. what you need is to know if your mouse did something.
You should probably use a timer thread(not doing much more than counting your 4mins, reseting and poping up your window) and on your main thread you implement the MouseMotionListener and MouseListener (maybe also ActionListener and friends) and reset your timer in the first line of those methods...

bozigle
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.