SumitBirla.com

Home » Software » StereoLights.class

StereoLights.class

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.

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)
Download sources: StereoLights.java
StereoPanel.java