title: Swing ComponentListener.componentShown is not fired
body: <p>I would like to get the (Graphics g) when the WorldPanel is shown. Thanks to stackoverflow I saw the answer where should I use the getGraphics method (ComponentListener.componentShown), but somehow my listener couldn't catch the componentShown.</p>
  
  <p>What did I wrong ? At the bottom of the code snippet the "hello" can't not be displayed.</p>
  
  <pre><code>public class MainPanel extends javax.swing.JPanel implements ComponentListener {
      private CWorldPanel WorldPanel; // extends JPanel
  
      private void initGUI() {
          try {
              ...
              this.setLayout(thisLayout);
              {
                  WorldPanel = new CWorldPanel();             
                  WorldPanel.addComponentListener(this);
  ...
      @Override
      public void componentShown(ComponentEvent e) {
          System.out.println("hello");
  
      }
  </code></pre>
  
  <p><strong>See my explanation and thanks at the bottom of the page (cscsaba)</strong></p>