public class RectLoop extends MyFrame{
    public void run() {
         setColor(0,128,0);
         int x=30;
         while (x<=170) {
              System.out.println(x); // ここを追加
              fillRect(x, 80, 10, 100);
              x=x+20;
         }
    }
}
