Re: integers and arrays in Java - how?



Oliver Wong wrote:


"Robert Baer" <robertbaer@xxxxxxxxxxxxx> wrote in message news:ciOWf.10285$Bj7.4597@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I used Google and found some references for integer in Java.
But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse.
What i would like to do:
1) Get X and Y mouse coordinates into a variable that i can do real math on.
So far, i can do math on the values "read" and that result goes into a "variable" that is useful *only* for display.
If i try "int" in that math, the values are then zero for everything - even those where i do no calculation.
2) Use the calculated integer values as an index to a table or array.
It is acceptable to use an HTML "table" as the source for the lookup; W(CalcFromX) and P(CalcFromX) would be the resulting values to be displayed on the screen somewhere.

Can this be done, and eXactly how?


I didn't understand your question at all. Perhaps you can post an SSCCE? http://mindprod.com/jgloss/sscce.html

Be sure to specify what results you expected your program to produce, and what results you actually got, and how they differed.

- Oliver
I *thought* i mentioned what i wanted to do, as well as "int" not only does not work, it kills the reading of mouse XY coordinates.
And i would have no clue as if the code was compilable or not, and i do not think i care, since the jave code is a part of an HTML web page.
However, i will copy the code i have across from my other OS drive later.

.



Relevant Pages

  • Re: integers and arrays inJava - how?
    ... But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse. ... Get X and Y mouse coordinates into a variable that i can do real math on. ... If i try "int" in that math, the values are then zero for everything - even those where i do no calculation. ... Use the calculated integer values as an index to a table or array. ...
    (comp.lang.java.help)
  • Re: integers and arrays in Java - how?
    ... But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse. ... Get X and Y mouse coordinates into a variable that i can do real math on. ... If i try "int" in that math, the values are then zero for everything - even those where i do no calculation. ... Use the calculated integer values as an index to a table or array. ...
    (comp.lang.java)
  • integers and arrays in Java - how?
    ... But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse. ... Get X and Y mouse coordinates into a variable that i can do real math on. ... If i try "int" in that math, the values are then zero for everything - even those where i do no calculation. ... Use the calculated integer values as an index to a table or array. ...
    (comp.lang.java)
  • integers and arrays inJava - how?
    ... But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse. ... Get X and Y mouse coordinates into a variable that i can do real math on. ... If i try "int" in that math, the values are then zero for everything - even those where i do no calculation. ... Use the calculated integer values as an index to a table or array. ...
    (comp.lang.java.help)
  • integers and arrays in Java - how?
    ... But "int" not only does not work, it also prevents reading X and Y coordinates of the mouse. ... Get X and Y mouse coordinates into a variable that i can do real math on. ... If i try "int" in that math, the values are then zero for everything - even those where i do no calculation. ... Use the calculated integer values as an index to a table or array. ...
    (comp.lang.javascript)