help with JOptionPane.showMessageDialog()
hi can someone please help me with JOptionPane.showMessageDialog();
all i want to do is set the dialog visible when a button is clicked. it must display a message, have the warning icon in the corner and have an option to click either yes or no buttons in the dialog. also i would like to write further code for when each of the butons are clicked.
this is my code, its not working
JOptionPane.showMessageDialog(null,"Are you sure you want to delete: " + selected, "Warning", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION);