title: Java Swing - set opacity for all children components?
body: <p>I've got some Swing components with children.  When I <code>setOpaque(false)</code> on the parent, the children still have opacity.  </p>
  
  <p>So I hacked up this function (thanks SOF users):</p>
  
  <pre><code>Component[] comps = this.getComponents();
  
  for(Component c : comps) { if(c instanceof JComponent) {
      ((JComponent)c).setOpaque(false); }
  }
  </code></pre>
  
  <p>But now I'm plagued with self-doubt - this seems sort of clunky, is there a better way to do it?</p>