Therefor i choosed a Radial2 component that has a standard look like this...
Disable the frame by setting the frameVisible property:
Disable the foreground by setting the foregroundVisible property:
Set the backgroundColor to TRANSPARENT:
So you will also find a property backgroundVisible which will disable the painting of the backgroundImage. If you use this one you won't also see the custom layer and custom background because they will be painted in the backgroundImage.
Create a image in a drawing program of your choice. Use the same size that your gauge has (otherwise your image will be scaled to the size of the gauge which could lead to quality loss due to scaling).
Apply your image to the gauge. I usually add the images to a package named resources and load them from there but you might want to load the image from another place. The following code is just a example:
// Add the following code to your initialization area
customLayer = ImageIO.read(getClass().getResource("/resource/CustomLayer.png"));
catch (IOException exception)
customLayer = null;
// Add the following code somewhere after the gauge was initialized
if (customLayer != null)
// Add the following code e.g. to a ActionListener of a button
With the given code your result will look like this...
Looks funny right...