| | |
help with java please.
![]() |
•
•
Join Date: Nov 2007
Posts: 62
Reputation:
Solved Threads: 7
It's a method, methods belong to objects of certain types. What is the type here? I want to help, but the name 'SlowMoveVertical' is a normal looking name that a lot of people already have used to create their own methods. Therefor, a google search isn't getting me anywhere unless I know with which type of objects this method is used.
Black Box
Black Box
Last edited by Black Box; Dec 4th, 2007 at 4:56 am.
•
•
Join Date: May 2006
Posts: 1,901
Reputation:
Solved Threads: 124
What problem are you facing? why do not you post the code here ?
•
•
Join Date: Nov 2007
Posts: 61
Reputation:
Solved Threads: 2
•
•
•
•
What problem are you facing? why do not you post the code here ?
{
private Circle balloon;
private Triangle bottom;
private Triangle end;
private Circle balloon2;
private Triangle bottom2;
private Triangle end2;
private Circle balloon3;
private Triangle bottom3;
private Triangle end3;
private slowMoveVertical balloon;
/**
* construct object
*/
public void draw()
{
balloon = new Circle();
balloon.changeColor("red");
balloon.moveHorizontal(8);
balloon.moveVertical(121);
balloon.changeSize(60);
balloon.makeVisible();
bottom = new Triangle();
bottom.changeColor("green");
bottom.changeSize(-38, 55);
bottom.moveHorizontal(8);
bottom.moveVertical(247);
bottom.makeVisible();
end = new Triangle();
end.changeColor("blue");
end.changeSize(7, 11);
end.moveHorizontal(8);
end.moveVertical(246);
end.makeVisible();
balloon2 = new Circle();
balloon2.changeColor("blue");
balloon2.moveHorizontal(125);
balloon2.moveVertical(175);
balloon2.changeSize(60);
balloon2.makeVisible();
bottom2 = new Triangle();
bottom2.changeColor("magenta");
bottom2.changeSize(-38, 55);
bottom2.moveHorizontal(125);
bottom2.moveVertical(301);
bottom2.makeVisible();
end2 = new Triangle();
end2.changeColor("green");
end2.changeSize(7, 11);
end2.moveHorizontal(125);
end2.moveVertical(300);
end2.makeVisible();
balloon3 = new Circle();
balloon3.changeColor("yellow");
balloon3.moveHorizontal(240);
balloon3.moveVertical(141);
balloon3.changeSize(60);
balloon3.makeVisible();
bottom3 = new Triangle();
bottom3.changeColor("blue");
bottom3.changeSize(-38, 55);
bottom3.moveHorizontal(240);
bottom3.moveVertical(267);
bottom3.makeVisible();
end3 = new Triangle();
end3.changeColor("black");
end3.changeSize(7, 11);
end3.moveHorizontal(240);
end3.moveVertical(266);
end3.makeVisible();
}
/**
* Create method for balloons to fly
*/
public void slowMoveVertical(int distance)
{
slowMoveVertical.balloon();
}
}
Erm, that method does not do anything at all and this declaration doesn't really make any sense Your slowMoveVertical() needs to move all of the drawn objects up by a certain distance.
Java Syntax (Toggle Plain Text)
private slowMoveVertical balloon;
Last edited by Ezzaral; Dec 6th, 2007 at 12:11 pm.
I told you in my post above. The slowMoveVertical() method needs to move all of the object up by "distance" and I would assume from the name that it should occur incrementally as a timed paint operation.
You may want to read through this tutorial article on animation in applets:
http://www.javaworld.com/javaworld/j...animation.html
You may want to read through this tutorial article on animation in applets:
http://www.javaworld.com/javaworld/j...animation.html
![]() |
Similar Threads
- Java 3D Environment (Java)
- Java 3D (Java)
- Java Expert (Needed) (Java)
- Java Chat Reboots (Java)
Other Threads in the Java Forum
- Previous Thread: BucketSoRt
- Next Thread: PacMan Boolean Problem Part Duex.
Views: 911 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for Java
actionlistener android applet arguments array arraylist arrays binary bluetooth c++ chat class classes client code compiler component convert converter coordinates data database db design detection draw eclipse error event exception fast file fractal givemetehcodez graphics gridlayout gui helpwithhomework homeworkassignment html ide image input integer j2me java javafx jframe jmf jni jpanel jtextfield key lazy linked linked-list list loop main method methods mobile netbeans newbie node number object oracle os pattern phone pixel print printing problem program programming read remote remove return robot scanner server set sms sort sql string swing system test text thread transfer translate tree user web windows






