title: Display status message on JLabel instead of console
body: <p>I need to print my game status messages such as players' turns, players' scores using JLabel or something similar. I am able to do so on console (<code>System.out.print()</code>).</p>
  
  <p>Basically, I have</p>
  
  <pre><code>JLabel statusBar, playerA, playerB; // Where I need to display scores and a message saying where each player have put their seeds on the grid
  JPanel mainPanel; //Which holds the grid
  JPanel leftPanel; // On which the status bar and other components are put
  </code></pre>
  
  <p>I can display those in the console with:</p>
  
  <pre><code>System.out.print("Path : " );
          for(Cell cell : this) {
              System.out.print(cell);
          }
          System.out.println("");
  
          List&lt;Cell&gt; capturedSeeds = getCapturedWithIn();     
  
          if(capturedSeeds.size() &lt;= 1) {
              System.out.print(capturedSeeds.size() + " " + "seed captured at: " );
              for(Cell cell : capturedSeeds) {
              System.out.print(cell);
              }
              System.out.println("");
          } else
              if(capturedSeeds.size() &gt;= 2) {
          System.out.print(capturedSeeds.size() + " " + " seeds captured at: " );
          for(Cell cell : capturedSeeds) {
              System.out.print(cell);
          }
          System.out.println("");
  
          }
  </code></pre>
  
  <p>With the above, I can print something like bellow in the console:</p>
  
  <pre><code>&gt;&gt; PION_ROUGE placed at (10,15)
   &gt;&gt; PION_BLEU placed at (11,15)
   &gt;&gt; PION_ROUGE placed at (11,16)
   &gt;&gt; PION_BLEU placed at (10,16)
   &gt;&gt; PION_ROUGE placed at (12,15)
   &gt;&gt; PION_BLEU placed at (12,16)
  
  Path : [11, 14]-PION_ROUGE[10, 15]-PION_ROUGE[11, 16]-PION_ROUGE[12, 15]-PION_ROUGE
  1 seed captured at: [11, 15]-PION_BLEU
  
   &gt;&gt; PION_BLEU placed at (11,17)
   &gt;&gt; PION_ROUGE placed at (19,16)
   &gt;&gt; PION_BLEU placed at (16,14)
   &gt;&gt; PION_ROUGE placed at (17,14)
  </code></pre>
  
  <p>I'm not experienced at all, this question may be silly to ask, but please bear with me.
  Fell free to ask any clarification.</p>