JOptionPane#showXXX methods accept an Object message argument. You can always pass a JColorChooser instance as the message and check for the color chosen by the user
This question is more suitable for the GUI forums.
Moving thread
It works, but now I want to apply the color to the JLabels of each. I tried the above code, but it didn't work.
I can't compile it because of setForeground. The error is "The method setForeground(Color) is undefined for the type String."
True.
But
1) Using a JOptionPane for the color chooser would offer the user the same experience as the number of players and name prompt
2) JOptionPane would allow the OP to display custom messages. Something like what color for the player?
3) I had JOptionPane so much in mind that I actually forgot about the JCholorChooser#showDialog()