less than 1 minute read

One of my very early experimentations with Java programming. StereoLights.class is a Java class that implements a column of lights whose dimensions and state can be controlled via simple method calls. You can change the volume by holding down the left mouse button and dragging up or down gently.

Yes, that is the original 1996 applet running live! Browsers dropped Java applet support long ago, but CheerpJ runs the JVM in WebAssembly. Give it a few seconds to boot, then drag up or down on the panel to change the volume.

Source code is available for download below. The following methods help manipulate the display:

StereoLights()
void setPosition(int x, int y)
void setSize(int width, int height, int numLights)
void setColors(Color baseLight, Color normal, Color extreme)
void draw(Graphics g, int level)
void refresh(Graphics g)

Tags:

Updated: