I have an java assignment in which I need to have the background color of a GUI change depending on user selected radio buttons listing different colors. My program has a JFrame to hold everything, then 3 JPanels (1 Instruction area, 1 Radio Button grid, 1 result Textfield) within that frame.
My action listener is currently setting the background color with this statement: getContentPane().setBackground(Color.decode(colorMap.get(btn.getName())));
The background for the JFrame and two of the three panels successfully changes to the correct color, but the panel holding the JRadioButtons will not change at all!
I have tried changing the opaque setting, I have tried setting the panel's background color to (0,0,0,0) but so far none of that is working for me. Does anyone have a suggestion of what I might try or read up on next?
I don't have enough reputation to post a picture but if seeing what I'm talking about helps, let me know and I can email you a screenshot.
Thanks!