This is my main code :
gui test = new gui();
input = JOptionPane.showInputDialog(" Enter how many item you want to buy ");
size = Integer.parseInt(input);
sportShop ar = new sportShop[size];
for (int i = 0; i<size; i++)
choice = JOptionPane.showInputDialog(" Enter your choice ");
After running the program, Both of my GUI and JOptionPane shows up on my window. What would be best to overcome this problem.