Write a program in Java that can be run both as an application and as an applet that demonstrates use of threads. User should be able to start and stop a thread, and adjust its speed by slowing down, speeding up, or returning to the default value. The demonstration thread should change the color of a GUI element as in the example below.
Please observe the functionality of the following applet. Your program does not have to look the same but it should respond with adjustment of speed to user's input via GUI interface in a very similar way. Please note that there is lower and upper limit on thread delay (10 and 1000 milliseconds). Also the suggested adjustment is +/-(1 +10% of current value).
A sample solution to this homework will be posted soon after it is due to allow better preparation for the upcoming exam. Please make sure that you submit your work on time. After a sample solution is distributed homework will not be accepted.
Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e- mail to the instructor at olekmali at bradley dot edu. Please set the message subject to: web-hw9.
Thank you.