| | |
help with java please.
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
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 5:56 am.
What problem are you facing? why do not you post the code here ?
•
•
Join Date: Nov 2007
Posts: 36
Reputation:
Solved Threads: 1
•
•
•
•
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 1: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: 859 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for Java
3d @param affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth byte c# chat class classes click client code compare component corrupted database detection draw eclipse error event exception file fractal game givemetehcodez graphics gui guitesting helpwithhomework html ide image input integer j2me java java.xls javaprojects jmf jni jpanel julia keytool linux list loop map method methods mobile netbeans newbie number object oracle os pong print problem producer program programming project projectideas read recursion reflection replaysolutions rim scanner screen server set size sms socket sort sql string swing terminal test threads time transfer tree web windows






