issue with - "cannot find symbol - variable JOptionPane"
807589Dec 13 2008 — edited Dec 13 2008need some help, got the below loop and want it to be able to loop by the number input by the input dialog. when i compile it i get an error in BlueJ. the error is "cannot find symbol - variable JOptionPane". Any help. have tried a few things however cannot get this to work at all. any suggestions?
public void numberLoop()
{
String qA = JOptionPane.showInputDialog(null,"How many times should this be completed (e.g. 1,2,3,4)?","Question",JOptionPane.QUESTION_MESSAGE);
int qA2 = Integer.parseInt(qA);
for (int startNum = 1; startNum <= qA2; startNum++)
{
System.out.println(startNum + " squared is " + (startNum * startNum));
}
}