Write a Java/swing program with the following descriptions:CS476/576
Assignment #5
Due Midnight, Wednesday Dec. 8, 2004
NAME
udpBAD - udpBirthAndDeath A Java program with a swing interface that manage a set of threads communicating with udp messages.SYNOPSIS
java udpBADDESCRIPTION
The
program creates a server thread
and nine
client threads.
Each client thread sleeps a random amount time T (between 1 and 60
seconds), sends a udp message to the server thread
and then terminates.
The server thread manages a
swing interface that has three areas:
Birth area:
is 3x3 grid with 9 green labels one
for each thread created.
Death area:
is 3x3 grid with 9 red labels one for
each dead thread.
Control area:
has two buttons, Start
and Quit
buttons.
When the user clicks on
the Start button, the server creates the 9 threads and inserts the
corresponding red labels in the Birth area.
When a thread termites its green label is removed from the Birth area
and a red label is inserted into the Death area. During that
phase both the Start and the Quit buttons becomes insensitive and their
color is changed to red.
When all processes are
terminated, both the Start and the Quit buttons becomes sensitive and
their color changes to green.