The DKnob is similar to JSlider but it is round. It is scalable so that
it can be used in different sizes. The value of the knob varies
between 0 and 1 (float) and you can add a change listener to it for
catching change events (see below example). The DKnob is shown as an image and a live appled below. If you have the Java plugin you can try it out! Download the DKnob example and Class files in this Zip file. You can also get the source here.
Comments or suggestions? please email joakim@dreamfabric.com
    
Source Code of above usage example:
/*
* DKnob example
* (c) 2000, Joakim Eriksson,
* Instructions at:
* http://www.dreamfabric.com/java/knob/knob.html
* Please e-mail joakim@dreamfabric.com for comments or
* questions.
*/
import java.applet.Applet;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
public class TestKnob extends Applet
{
public void start() {
DKnob knob;
JLabel jl;
setLayout(new BorderLayout());
JPanel jp = new JPanel(new BorderLayout());
jp.add(knob = new DKnob(), BorderLayout.CENTER);
jp.add(jl = new JLabel("Value: 0"), BorderLayout.NORTH);
add(jp, BorderLayout.CENTER);
final JLabel jla = jl;
// Add a change listener to the knob
knob.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
DKnob t = (DKnob) e.getSource();
jla.setText("Value: " +
((int)(100 * t.getValue()))/100.0 );
}
});
}
}