Computer Science Canada Help with mouse movement |
Author: | Token [ Thu Mar 09, 2006 7:06 am ] | ||
Post subject: | Help with mouse movement | ||
Okay, I made a program and i'm having troubles getting the mouse listener to work, i looked around at the site but i still have had no success, its not for school so feel free to add or remove lines or whatever, if you want to see what i wrote before I changed the mouse thing read the commented instructions in the code. Thanks in advance.
|
Author: | wtd [ Thu Mar 09, 2006 12:34 pm ] |
Post subject: | |
Don't mix standard Java and HSA stuff. |
Author: | Token [ Thu Mar 09, 2006 6:25 pm ] |
Post subject: | |
hmmm, ya, i'm new to java so i dont really know the diference, feel free to explan, and while your at it can you complete the code? i learn better when i have somthig to look at, or even just give me the bits and pieces i need to make it work? thanks |
Author: | wtd [ Thu Mar 09, 2006 7:02 pm ] |
Post subject: | |
Well, I'm not going to do your homework for you, but I mean getting rid of the "hsa." imports. You'll find everything you need exhaustively documented at http://java.sun.com. |
Author: | Token [ Mon Mar 20, 2006 10:23 am ] |
Post subject: | |
I've been looking for a while now and so have a few of my class members and we've come across nothing. I dont understand why you wont just tell me or at least give me some example code, its not for class (seeing as my teacher can't even tell me) can somone please just post an example of code which outputs the mouse co-ordiantes to the screen? as simple as posible? I'd really appreciate it. |
Author: | McKenzie [ Thu Mar 23, 2006 8:43 pm ] |
Post subject: | |
Well, if you are using the mouse there are a number of options. You are asking for the simplest code but the problem with that is the simplest code has been deprecated years ago. Using deprecated commands is almost as bad as using the HSA classes (I know it's not your fault; your teacher is following Holt's advice and doing what he feels is best.) The most common way to handle the mouse these days is by using swing. I know it sounds like a lot when all you want to do is get your old mousewhere to work but it's the best way to go. Here is an example of a simple swing application that eventually became GO. |
Author: | McKenzie [ Thu Mar 23, 2006 8:55 pm ] |
Post subject: | |
Oh, If you just don't care about style, look here: |
Author: | wtd [ Thu Mar 23, 2006 9:41 pm ] |
Post subject: | |
If I may ask... why the old code? Even the first example you gave is at best Java 1.4.2. 1.5.0 is no longer "bleeding edge." |
Author: | Hikaru79 [ Thu Mar 23, 2006 11:06 pm ] |
Post subject: | |
wtd wrote: If I may ask... why the old code? Even the first example you gave is at best Java 1.4.2. 1.5.0 is no longer "bleeding edge."
The Go thing he wrote a pretty long while ago. The second one is intentionally old, judging by the comments at the top; its just an example of the old JDK 1.1 api for comparison's sake. |
Author: | wtd [ Thu Mar 23, 2006 11:13 pm ] |
Post subject: | |
Ah. |
Author: | McKenzie [ Sat Mar 25, 2006 9:18 pm ] |
Post subject: | |
He is clearly using RTP. The best he can run is 1.42 if he has the newest version. |
: |