Random Color Grid
2018-06-24
0 0 0
no vote
Other
Earn points
import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class RandomColorGrid extends Applet { ColorSwatchCanvas canvas0, canvas1, canvas2, canvas3; // canvases to be displayed in applet Thread runner; // A thread that randomly changes the color of a canvas every so often. // Note that all synchronization in this applet is done on the Thread object. volatile int status; // Status variable for controlling the thread. final static int GO = 0, SUSPEND = 1, TERMINATE = 2; // Possible values for status variable. class Runner extends Thread { // The runner for the RandomColorGrid canvas will be an // object belonging to this nested class. public void run() { // Run method picks a random canvas, changes it's color, then waits for // a random time between 30 and 3029 milliseconds, and then repeats. while (status != TERMINATE)
Related Source Codes
Android AOA Android Open Accessory Development Usi
0
0
no vote
Golang AOA Android Open Accessory HID Control
0
0
no vote
PClite
0
0
no vote
GMSK Linear Receiver
0
0
no vote
The golden version of AFT that has been passed dow
0
0
no vote
No comment