I have a jpanel and inner jpannels in it.
When I set the panel background dynamically the inner colors dont change.
to init :
myPanel.setOpaque(true)
and then
myPanel.setBackground(...)
Is there a solution to set the background to all of the inner frames without looping or direct set?
Thank you.
No, but if you set the inner panels to non-opaque (transparent) you can change the outer panels directly:
You can always craete a class that you can use instead of
JPanel:Full example: