I want to change YES and NO to something like Agree/Disagree. What should I do?
int reply = JOptionPane.showConfirmDialog(null,
"Are you want to continue the process?",
"YES?",
JOptionPane.YES_NO_OPTION);
You can do the following
JFrame frame = new JFrame();
String[] options = new String[2];
options[0] = new String("Agree");
options[1] = new String("Disagree");
JOptionPane.showOptionDialog(frame.getContentPane(),"Message!","Title", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);
output is as follows
For more details about the showOptionDialog() function see here.