Getting a clock hand to go anticlockwise..
Hi. I have this program:
public class Lines2 extends Applet
Color blue = new Color(180,255,255);
Color black = new Color(0,0,0);
public void paint(Graphics g)
int x = 0;
int y = 0;
double angle = 0;
x = (int)(java.lang.Math.cos(angle)*100) + 120;
y = (int)(java.lang.Math.sin(angle)*100) + 120;
for(int delay = 0;delay<2000000;delay++);
angle = angle + 0.01;
I would like to modify the program so that the clock hand sweeps anticlockwise to colour in a circle, then make it sweep the other way to erase the colour. I have tried changing the angles etc but can't get it right. Thanks for your time and help.
Problem solved. Thanks anyway.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL