Thats the main issue I had was that when I used that command jps, it tells me "array found, but arraylist required"
Type: Posts; User: crzybldthrwr
Thats the main issue I had was that when I used that command jps, it tells me "array found, but arraylist required"
Languages like C++ and VB which I know pretty well I can do things by myself and solve issues by myself.
But java is new to me and I can't do that.
edit: Thanks for you help though, I did learn...
Well thanks anyways. I can't learn like others learn, looking at API docs and trying these "simple" programs to test class features and such. I need to see relevant examples in terms of my own code,...
I honestly have no idea.
I don't know how to access the X and Y coordinates from the Point instance while they're in that arrayList element.
that's it.
No matter how simple the program is, if I don't know the syntax it's not gonna matter.
For me it won't help because I don't know the syntax?
all I need to figure out is how to get the x and y from the Point instance in the arraylist.
As each element in the array is an instance of Point, that means each element has an x and a y in that container; i just don't know how to access them
because ia[1].getX() doesn't work lol
I don't see how that would really help me, as I don't know how to GET the x and y from the instances of the class within the array, so i can't write that simple program?
Edited post 67 to include my progress
as in post 67, just not sure how to call getX and getY from the point class while inside the drawline function
Am i creating seperate instances of the class for every new xy coordinate?
EDIT: this is what I have so far, I'm confused now as to how to get the x,y from each point instance when calling...
I have
public class point{
protected int x, y;
}
and that's as far as I got
Now I'm just more confused.
I can't get a feel for it by looking at all the docs and functions of the class, I need to be able to find semi-relevant examples of the code, and I can't find that for...
I guess what I really meant was, do I use al.add(x) and then al.add(y)
or should I give them specific locations in the array like al.add(1, x) ?
I guess my question isnt where, its pretty much how.
I know the calls, Ijust don't know where to implement them
Ok now my issue comes in, where exactly am I adding points to the arraylist AND how exactly do i make it so it draws everypoint?
OH ok , I already have an arraylist defined up there, i've kept it there incase.
is something like this correct?
ArrayList al = new ArrayList(50000);
Integer ia[] = (Integer[])...
by at class level you mean, do something like:
public class ArrayList {
....
}
Because the applet would need to redraw every point in the array like, everytime the mouse moved?
I tried and you keep saying to use an arraylist.
I dont know how, as i've said before. I know the calls and such, but I don't know where I'd put any of it.
Hm I have jdk 1.7.0_07
so What do you suggest?
I'm not really sure what you meant by move the GUI, could you point out where in the code that would be done?
nvm I figured it out, but it still gives me that weird textArea thing
How did you do that?
Well what's different about your code and mine?
Here are the two files I'm using as of right now
MouseMotionEventDemo.java
package events;
/*
* MouseMotionEventDemo.java
*