HW3: Using Threads
Due: Wed, Mar 26, 2003
Define a class, say HW4Thread, extending the Thread class.
The class should take a JTextArea type as one of the arguments
for the construtor.
- In the main applet, create say, three JCheckBox's and three
JTextArea's. Use arrays. Also, create three threads of the above
class. Hint: Do not start the threads in the init() method.
Add ActionListeners to the checkboxes just like the buttons.
In the actionPerformed method, you can call the boolean method
isSelected() on a JCheckBox to see if it is selected or not.
- When the checkbox is selected, the corresponding thread would
print some lines in its associated TextArea.
- A link to the source code of your applet.