I wasn't sure where to post this or if there was a helps forum, but having asked many questions here, I thought I would contribute a solution or helper that I found valuable and would like to share!
I was surprised in searching myself for an answer on this subject how difficult it was to find a clear solution or coded around it, making it far more complicated than it needs to be. Even the Oracle docs were hard to follow. In Intellij, you only see a couple overloaded methods instead of the full range of options unless keep typing commas, and so naive people like me think there are not any remaining overloaded methods. By the time you get to the Icon and button parameters you thin you are at the end... Not so here! These default parameters fall after the icon and appear as the last two parameters.
The first of the two defaults I have marked bold, 'null', is a very cool parameter allowing you to enter an array of options (String) of 'selection values'.
A list with with a default picked
JOptionPane.showInputDialog(null, "What primary color is your favorite?", "Pick a color", JOptionPane.PLAIN_MESSAGE, null, ans, ans)
No list (null) and default string
JOptionPane.showInputDialog(null, "What primary color is your favorite?", "Pick a color", JOptionPane.PLAIN_MESSAGE, null, null, "Red")