I think what Sham wants isn't in there, because it's usually not something you modify manually. If I understand correctly, it's not the icon in the dialog's content pane but the icon at the top-left of the dialog's title bar - the bar with the little close button on the right.
It's possible to change this, but not using the static JOptionPane methods. You need to:
1) create a JOptionPane instance, with the appropriate arguments.
2) call createDialog on that instance, with the appropriate arguments.
3) call setIconImage on the created JDialog to change the icon.
4) show the dialog (setVisible(true)).
5) get the JOptionPane's value (getValue()).
6) compare the value (as an Integer by default) against the possible values (JOptionPane.OK_OPTION, etc). Beware of null, as that indicates the dialog was closed using the close button.
7) do something based on that value.
Steps 5-7 are not needed if you only need to show a message with a single OK button.
It's a shame that JOptionPane is so limited sometimes. By default it also uses application modality, so in a project where I needed document modality (check out ModalityType for more info) I had to create all the dialogs like this as well, so I could manually change the modality.