Hi, thanks so much for your help already! I've read through all the tutorials you suggested and understand a bit more (this is all sort of over my head right now). I understand what you've shown me so far, but there are a few areas where I am confused:
In the code where you put this
for (int i = nodes.size()-1; i >= 0; i--) {
Node node = (Node) nodes.get(i);
node.display();
I don't understand what this means. Is this what actually draws the Nodes? Where it says size()-1, does this make the Node at (0,0) disappear? Because it doesn't show up for me.
Also,
What does this part do exactly?
Node(float tempX, float tempY, color tempColor) {
xpos=tempX;
ypos=tempY;
c = tempColor
And can I now locate each of the Nodes by running a new draw command and typing Node[1] for example to locate Node 1?
Thanks again for all of your help and if anyone can help with this, thanks!
yes, that draws the node. It goes thorugh the List (it is an arrayList, you could look this up in the reference too).for (int i = nodes.size()-1; i >= 0; i--) {Node node = (Node) nodes.get(i);
node.display();
Is this what actually draws the Nodes?
That is a part of the Class. It has the same name like the Class. It is the constructor. With it you call a real element, a real circle into existence (you construct it). You use the Class, the blue print, the idea of a circle, to make one real circle with position and color and so forth.Node(float tempX, float tempY, color tempColor) {
xpos=tempX;
ypos=tempY;
c = tempColor
And can I now locate each of the Nodes by running a new draw command and typing Node[1] for example to locate Node 1?