import java.awt.*;
import java.applet.*;

public
class FlowString extends Applet
{
   int x, y, j;
   String napis;
   Font fontTimesRoman;
   public void init()
   {
      x = 0;
      y = 180;
      j = 1;
      napis = new String ("HOP HOP");
      fontTimesRoman = new Font ("TimesRoman", Font.BOLD, 36);
   }
   public void paint(Graphics gDC)
   {
      while (true){
         gDC.setColor (Color.white);
         gDC.setFont (fontTimesRoman);
         gDC.drawString (napis, x, y);
         x += j;
         if ((j == 1) && (x > 530)){
            j = -1;
         }
         else if (x <= 0){
            j = 1;
         }
         gDC.setColor (Color.blue);
         gDC.setFont (fontTimesRoman);
         gDC.drawString (napis, x, y);
         for (int i = 0; i < 100000; i++);
      }
   }
}
