title: Java JFrame clear just an added GLabel
body: <p>I'm very new in Java so excuse me if my question seems to be too stupid.</p>
  
  <p>I have an text menu defined into JFrame -> Container -> GCanvas with GLabels like that:</p>
  
  <ol>
  <li>Exit</li>
  <li>Power of number:</li>
  <li>n Factorial:</li>
  </ol>
  
  <p>I can choose an option number like that:</p>
  
  <pre><code>    public int bagaOcifra(){
      IODialog consola = new IODialog();
      int aleg = consola.readInt("Choose a menu option: (0 - exit):");
      return aleg;
  }
  </code></pre>
  
  <p>After I choose, let's suppose option 1, I add a new GLabel "result" with result's string and the menu became:</p>
  
  <ol>
  <li>Exit</li>
  <li>Power of number: <b>The result is: 8</b></li>
  <li>n Factorial:</li>
  </ol>
  
  <p>So, when I'm "come back" and I choose again option 1 I want to remove just the Glabel "reusult" added there: canvas.add(result, 250, 100);.</p>
  
  <pre><code>do { 
      int ceAmAles = bagaOcifra();
      switch (ceAmAles) {
  
      case 0:
      System.exit(0);
  
      case 1:
      double rezCalculPutere = alegere1.CalculPutere();
      GLabel result= new GLabel("The result is: " + rezCalculPutere);
      canvas.add(result, 250, 100);
      break;
  
  case 2:
          ...
  
      case 3:
              ...
          }
  } while (true);
      }
  </code></pre>
  
  <p>Can I do that, or I must re-add all Canvas objects ?</p>
  
  <p>I mention that:</p>
  
  <pre><code>  do { 
      int ceAmAles = bagaOcifra();
      switch (ceAmAles) {
  
      case 0:
      System.exit(0);
  
      case 1:
      canvas.remove(result); // &lt;b&gt; it's not working &lt;/b&gt;
      double rezCalculPutere = alegere1.CalculPutere();
      GLabel result= new GLabel("The result is: " + rezCalculPutere);
      canvas.add(result, 250, 100);
      break;
  
  case 2:
          ...
  
      case 3:
              ...
          }
  } while (true);
      }
  </code></pre>
  
  <p>I even try to construct an empty GLabel and add over my "result" GLabel but no luck.</p>
  
  <p>Thank you in advance.</p>