public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
public static int showConfirmDialog(Component parentComponent, Object message)
  public static int showConfirmDialog(Component parentComponent,                                      Object message, String title,                                      int optionType, int messageType)  {    JOptionPane pane = new JOptionPane(message, messageType, optionType);    JDialog dialog = pane.createDialog(parentComponent, title);    dialog.pack();    dialog.show();    return ((Integer) pane.getValue()).intValue();  }