Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java - Speed Control

craigster
craigster 


Instructions are attached in the word document. java files are attached below as well. Thank you for your help ! Attachments Tags
Clarifications

Answers

Java - Speed Control - Solution

mariobeka
mariobeka 



Below you will find the completed project together with some comments. Attachments
Circle.java (2 K) Download Preview
x-coord of upper left-hand corner 0..599 // -- y-coord of upper left-hand corner 0..399 //--------------------------------------------------------- public Circle() { radius = Math.abs(generator.nextInt())%50 + 25; color = new Color(Math.abs(generator.nextInt())% 16777216); x = Math.abs(generator.nextInt())%600; y = Math.abs(generator.nextInt())%400; } //--------------------------------------------------------- // Creates a

SpeedControl.java (1 K) Download Preview
// Demonstrates animation -- balls bouncing off the sides of a panel - // with speed controlled by a slider. // ******************************************************************** import java.awt.*;

SpeedControlPanel.java (3 K) Download Preview
-------------------------------------------- // Sets up the panel, including the timer // for the animation // -------------------------------------------- public SpeedControlPanel () { timer = new Timer(30, new ReboundListener()); this.setLayout (new BorderLayout()); bouncingBall = new Circle(BALL_SIZE); moveX = moveY = 5; // Set

Screen Shot 2014-05-11 at 10.31.08 PM.png (23 K) Download Preview

Screenshots
Screenshot
Purchase Answer