im pretty new to java but for an input box i woud do something like this...
Code:
UserInput = new javax.swing.JOptionPane().showInputDialog("Enter a value");
and since the input is a String use, you need to convert it to int inorder to perform mathamatical operations on it, so possable something like
Code:
x = Integer.parseInt( UserInput );
then just use a for loop to do the iterations
but i know very little regarding java so dont quote me