// Gogga with input import it.*; import javax.swing.JOptionPane; import java.awt.*; public class GoggaWithInput { public static void main (String[]args) { String numberSt = null; int number = 0; int counter = 0; JOptionPane.showMessageDialog(null, "Welcome to Gogga with Input"); numberSt = JOptionPane.showInputDialog(null, "How many times must the Gogga move?"); number = Integer.parseInt(numberSt); Gogga.setGridSize(20,20); Gogga widget = new Gogga(8,8,1,Color.green); while (counter < number) { widget.move(); widget.move(); widget.move(); widget.turnRight(); counter = counter + 1; } // end while } // end main } // end class