Note that you can initialize the car's color in the MyPanel constructor after the call to the initComponents method.