By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,939 Members | 1,602 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,939 IT Pros & Developers. It's quick & easy.

I need help creating a Java applet .....

P: 9
Hey all !! I'm having a frustrating time trying to create a particular Java applet for a class.. I have no clue how to accomplish this, and really need HELP.. Anyone, PLEASE help me if you can, any help is appreciated the exact details are below:

I'm trying to create an applet that will draw 200 lines all of the same length starting from coordinate (0, 0) each with a random color.After drawing each line call the method Wait.holdOn(10) to let the next line is drawn after 10 nanoseconds. When all 100 lines are drawn then gradually clear the applet. That is drawing each line with the color of the background of the applet starting with the last line. Repeat the whole process five times (you need to put your code inside a for-loop which iterates 5 times).
Note: Include the class in the folder of this program
Note: Random colors meaning every time you run the program we get a different color for the same line.

He's says to add the below class to this applet:

public class Wait{
public static void holdOn(long period){
}catch(Exception e){}

Mar 6 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.