Bounces 2 balls around the screen. Can be easily modified to allow more than 2 balls. The user can adjust the speed of the balls seperately while the program is running.
File List:
Project2/
0b
Project2/Ball.class
2Kb
Project2/BounceThreadFrame$1.class
483b
Project2/BounceThreadFrame$2.class
1Kb
Project2/BounceThreadFrame$3.class
1Kb
Project2/BounceThreadFrame$4.class
1Kb
Project2/BounceThreadFrame$5.class
1Kb
Project2/BounceThreadFrame$6.class
1Kb
Project2/BounceThreadFrame$7.class
1Kb
Project2/BounceThreadFrame.class
2Kb
Project2/Project2.class
347b
Project2/Project2.java
4Kb
Similar code
Magnifier
(Popularity: ) : Magnifier lens that provides a way to enlarge items on the screen.
a 3d Shapes using math object
(Popularity: ) : This code generats nice 3d shapes using the Math.cos and Math.sin objects. i think every programmer should play with those, i tell my students to try and make a char like '*' go in circles around the screen.
Billiard Balls
(Popularity: ) : Any number of balls (specified by a constant) will bounce around the screen, bouncing off of each other and the walls with perfectly elastic collisions. Uses a thread to control the balls and double buffering to repaint without flickering. The ... Soothing Rain
(Popularity: ) : Soothing Rain Drops. Includes three classes. SRainDrop, SRainPanel, and SRainFrame. All classes are commented, but the code is simple enough. The Rain Drops fall into a pond and leave a circle. See screen shot. Please leave comments. Thank you.