Im new to java. I have an assignment where I have to make a grade calculator. When the enter button is clicked a joptionpane appears and asks the user how many grades are to be entered. After clicking ok another joptionpane appears asking for the scores so they can be stored and later averaged. The number of joptionpanes that appear asking for scores depends on the value that was entered into the first joptionpane. I have to create a for loop. I understand the concept of a for loop but I do not know how to correctly code the for loop so that the joptionpane repetitively asks for scores depending on the value entered in the first joptionpane. If anybody could point me in the right direction it would be greatly appreaciated.