title: java swing - set background to the panel and all of the panels inside
body: <p>I have a jpanel and inner jpannels in it.<br>
  When I set the panel background dynamically the inner colors dont change.<br>
  to init :  </p>
  
  <pre><code> myPanel.setOpaque(true)
  </code></pre>
  
  <p>and then </p>
  
  <pre><code> myPanel.setBackground(...)
  </code></pre>
  
  <p>Is there a solution to set the background to all of the inner frames without looping or direct set?<br>
  Thank you.</p>