public static int showConfirmDialog(String msg, String title, int option, int type){
        if (type < 0 || type > 2) type = 1;
        return JOptionPane.showConfirmDialog(null, msg, (title == null ? "Confirm message" : title),
                option, type);
    }