Jul 26, 2008

Question About Mouselistener - Specifically getX() and getY()

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Question About Mouselistener - Specifically getX() and getY()

beeseven
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?

Reply

BuffaloHELP
QUOTE(beeseven @ Jul 12 2005, 08:14 PM)
Is there any way to make it more accurate? Or would I have to write some complex thing that adjusts for it?
*


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.

 

 

 


Reply

beeseven
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : mouselistener specifically getx gety

  1. Confused With Mousemotion Listener And Mouselistener - (5)



Looking for mouselistener, specifically, getx, gety

Searching Video's for mouselistener, specifically, getx, gety
advertisement



Question About Mouselistener - Specifically getX() and getY()



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE