title: How do I get paintComponent(Graphics g) to call? repaint() won't work every time
body: <p>The following in a Java SE6 program that is a tic tac toe game:</p>
  
  <p>I have a class <code>MiniPanel</code> that extends <code>JPanel</code> that I have in a grid. If the user clicks one of these, a listener does some stuff then... eventually, it calls a method placeX() or placeO() on the MiniPanel that was clicked. That does some stuff then prints out a message saying that the method was called, and the very next line calls an animatePanel() method, which calls repaint() inside, printing out a message right before.</p>
  
  <p>The class <code>MiniPanel</code> also overrides <strong><code>paintComponent(Graphics g)</code></strong> with a method that <em>first</em> prints out a message saying that paintComponent was called THEN does <code>super.paintComponent(g)</code> and then does other stuff.</p>
  
  <p>The problem is that when I click a <code>MiniPanel</code>, the first 2 messages saying that <code>placeX()</code> or <code>placeO()</code> and animatePanel() was called appears, which means that <code>repaint()</code> <em>must</em> have been called. But <code>paintComponent(Graphics g)</code> is never called! Another weird thing is that it works if I call <code>placeX()</code> directly when the <code>MiniPanel</code> is initialized but not otherwise.</p>
  
  <p>I only have <code>paintComponent(Graphics g)</code> overridden, nothing else.</p>
  
  <p>Here is paintComponent:</p>
  
  <pre><code>public void paintComponent(Graphics g){
          if (Controller.DEBUG) System.out.println("MiniPanel at ("+row+", "+col+") received paintComponent (is repainting now).");
          super.paintComponent(g);
          ...
          ...
      }
  </code></pre>
  
  <p>placeX (placeO is pretty much the same thing):</p>
  
  <pre><code>    public void placeX(){
      ...
      if (Controller.DEBUG) System.out.println("MiniPanel at ("+row+", "+col+") received placeX.");
      ...
      animatePanel();
  }
  </code></pre>
  
  <p>animatePanel:</p>
  
  <pre><code>        private void animatePanel() {
      if (Controller.DEBUG) System.out.println("MiniPanel at ("+row+", "+col+") doing animatePanel().");
      timer.start();
  }
  </code></pre>
  
  <p>The timer calls this repeatedly for a little animation:</p>
  
  <pre><code>        private ActionListener taskPerformer = new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
          if (Controller.DEBUG) System.out.println("MiniPanel at ("+row+", "+col+") doing actionPerformed().");
          ...
          if (Controller.DEBUG) System.out.println("MiniPanel at ("+row+", "+col+") about to repaint... Should receive paintComponent command!");
          repaint();
      }
  };
  </code></pre>