Custom swing component

During my vacation i’m playing around with the SunSPOT’s from Sun Microsystems which are fantastic little gadgets. (Please find more information about them here.)
I attached a combined temperature/humidity sensor to one of my spots and used xmpp protocol (with smack library) to communicate with my SunSPOT host application from wherever I am.
To visualize the measured values I needed something sexy and because there was nothing ready to go I created two little „instruments“ that I would like to share with you.

And here they are:

First a gauge:


Second Java Swing component is a display (yes I know it’s inspired by Apples iTunes):


Third custom Swing component a combination of the display with a led panel:


I think I’ll have to do some work at the 3d-effect of the rounded rectangle but as a first prototype they looked ok to me.

You can find my presentation on custom Swing components here, the Netbeans project for the components in the article can be downloaded here: Instruments, the Netbeans project for the application from the slides is here:

If you are interested, please leave a comment…


7 thoughts to “Custom swing component”

  1. Very nice controls – and your presentation on creating custom Swing components to add some bling to your forms is excellent. Easily the clearest explanation of how to overload the paint method to make your forms look fantastic. Thanks for sharing this!

  2. This is where Swing has always shined, creating really cool custom components. It’s such a shame Sun is abandoning a great mature framework like Swing.

Kommentare sind geschlossen.