JOptionPane - Inputting an array of numbers

How do I input a few numbers one after the other with the above tool.

I presume I create a loop to enter a number until the amount of times you want a number to be entered has been reached(eg. enter a total of 6 numbers one after the other and output these)

Do you have to place the numbers in an array.

If you could advise of a way of doing this through code then I would be very grateful.


Could you explain exactly what you’re trying to do?

Are you looking for a human to input numbers into a JOptionPane? Or are you attempting to show random numbers in a JOptionPane?