I'm trying to make a JOptionPane with input area that only has an OK button.
When trying to do this, there is no icon but an additional cancel button:
String name = (String) JOptionPane.showInputDialog(null, "Please enter your name", "Name required", JOptionPane.PLAIN_MESSAGE, null, null, "name");
And when I do this there's an icon:
String name = (String) JOptionPane.showInputDialog(null, "Please enter your name", "Name required", JOptionPane.OK_OPTION, null, null, "name");
Is there a way to combine the two? I don't understand how the latter works because I used null where you'd place an icon.