Reputation: 55
Using this code, the icon is not removed
int returnValue = JOptionPane.showOptionDialog(null, "Successfully Updated", "Message",
JOptionPane.PLAIN_MESSAGE, 0, null, buttons, buttons[0]);
Im not yet allowed to upload images
Upvotes: 1
Views: 758
Reputation: 1803
You have specified the message type in the wrong parameter field.
Your code should look something like this.
int returnValue = JOptionPane.showOptionDialog(null, "Successfully Updated", "Message",
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, buttons, buttons[0]);
The 'JOptionpane.OK_CANCEL_OPTION' can be changed to whatever you want, I messed around with it a bit and it did not seem to matter what it was for the use you gave it.
The new option dialog will look something like this (From when I ran it with the above code).
Upvotes: 3