title: Java Applet refresh problems
body: <p>I have a Java Applet (JApplet). This Applet uses a JComponent(PanelAux) to show values and images that change periodically. But the applet doesn't refresh itself. What can I do to refresh my applet? </p>
  
  <pre><code>//--------------------------------------------RUN
  
  public void run()
      while (true) {
          try {
              myThread.sleep(1000);
          } 
          catch (InterruptedException e){
          }    
          repaint();
      }
  }
  //--------------------------------------------PAINT
  public void paint(Graphics g)
  {     
  
      dim  = new Dimension(image.getWidth(this)+50,image.getHeight(this)+50);
      this.resize(dim);
      this.setMaximumSize(dim);
      this.setMinimumSize(dim);
  
      PanelAux panel = new PanelAux(image);   //JComponent
  
      add(panel);
  
      super.paint(g);
  }
  </code></pre>
  
  <p>Thank you</p>