public static int showOptionDialog(Component frame, String msg, String title, int opt_type, int msg_type, Icon icon, Object[] opts, Object init) { Integer a = (Integer) DoShowOptionDialog(frame, msg, title, opt_type, msg_type, icon, opts, init); if (a == null) return -1; return a.intValue(); }
public static int showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) { JOptionPane pane = new JOptionPane(message, messageType, optionType, icon, options, initialValue); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show();  return ((Integer) pane.getValue()).intValue(); }
    public static int showOptionDialog(Component frame,				String msg, 				String title, 				int opt_type, 				int msg_type,				Icon icon, 				Object[] opts, 				Object init)    {	Integer a = (Integer) DoShowOptionDialog(frame,						 msg, 						 title, 						 opt_type, 						 msg_type,						 icon, 						 opts, 						 init);	if (a == null)	    return -1;	return a.intValue();    }