Jump to content
xisto Community
Sign in to follow this  
beeseven

Question About Mouselistener Specifically getX() and getY()

Recommended Posts

I have to do this program for summer school computer science (I didn't fail- my school requires a few extra credits so some people take classes over the summer instead of forfeiting electives), and I finished it early, so I wanted to make it cooler. It's a ball that bounces around the screen and touches another little ball, which then moves to somewhere else. A bunch of people were messing with theirs, seeing how many points they could get, making cheats, etc., so I wanted to add something that moves the ball to a place clicked.Anyway, to the problem: It works pretty well, except the farther I click from (0,0), the less accurate it becomes. Like if I click at (400,400), it'd appear around (395,375).Is there any way to make it more accurate? Or would I have to write some complex thing that adjusts for it?

Share this post


Link to post
Share on other sites

Is there any way to make it more accurate? Or would I have to write some complex thing that adjusts for it?

160302[/snapback]

Sounds like it's more technical that I expected. What I can comment on this is that sometimes it's all in the hardware. When you purchase a mouse (any type, ball or inverted) the good ones will have sensitivity ratings. For example, my Kensington TurboBall has 160dpi sensitive rating where as my Wacom tablet has 600dpi.

 

Using my Kensington mouse I can do just about any device pointing job. But with my Wacom tablet I can edit any high resolution photo as though I was creating from a scratch. I can notice that when I use Kensinton mouse I cannot quiet pin-point certain pixel area to color or edit. Perhaps the mouse that is attached to the computer isn't as sensitive as it should be.

Share this post


Link to post
Share on other sites

Hmm, that would make sense- this mouse really sucks.Randomly while I'm playing games the buttons click themselves and sometimes the pointer just goes crazy.I'll try at school tomorrow and see what happens.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.