Click "show more" to download code and documentation.
JSwitch is a fine addition to the rest of Java's swing components. It mimics and on/off switch, similar to the switches you might see on your phone. This video contains a tutorial for how to use JSwitch, as well as explaining the code in the last few minutes of the video, so that you could modify it as you see fit.
download the code and documentation here:
https://drive.google.com/file/d/0B5Ij8jH3KP9VVGF4YUlPUW50eWc/view?usp=sharing