This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I see you are creating a "JLabel" and then adding the Meter object into it.
Why don't you just "paint" the SpeedMeter with the image you need in the background and just add "SpeedMeter" in the JPanel?
- Set up the background image in the SpeedMeter paintComponent() (once it's a JLabel).
- Don't forget to use the repaint() method if you need to update the "Meters"
- Once you have done that, just instantiate a SpeedMeter and add it to the panel object.