public PrivatePackDialog() {
        super(LaunchFrame.getInstance(), false);

        setupGui();

        getRootPane().setDefaultButton(add);

        add.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent e) {
                if (!modpackName.getText().isEmpty() && DownloadUtils.staticFileExists(modpackName.getText() + ".xml")) {
                    if (!packExists(modpackName.getText())) {
                        Logger.logInfo("Adding: " + modpackName.getText());
                        ModPack.loadXml(modpackName.getText() + ".xml");
                        Settings.getSettings().addPrivatePack(modpackName.getText());
                        Settings.getSettings().save();
                        setVisible(false);
                    } else {
                        ErrorUtils.tossError(I18N.getLocaleString("PRIVATEPACK_ALREADY_ADDED"));
                    }
                } else {
                    ErrorUtils.tossError(I18N.getLocaleString("PRIVATEPACK_ERROR"));
                }
            }
        });

        cancel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent e) {
                setVisible(false);
            }
        });

        remove.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed (ActionEvent arg0) {
                ArrayList<String> codes = Settings.getSettings().getPrivatePacks();
                String toRemove="";
                for(String s: codes) {
                    if(s.equalsIgnoreCase(modpackName.getText()))
                        toRemove = s;
                }
                if (!toRemove.isEmpty()) {
                    Settings.getSettings().removePrivatePack(toRemove);
                    Settings.getSettings().save();
                    try {
                        for (ModPack pack : ModPack.getPackArray()) {
                            if (pack.getParentXml().equalsIgnoreCase(toRemove + ".xml")) {
                                FTBFileUtils.delete(new File(OSUtils.getCacheStorageLocation(), "ModPacks/" + pack.getDir()));
                                break;
                            }
                        }
                        ModPack.removePacks(toRemove + ".xml");
                        FTBFileUtils.delete(new File(OSUtils.getCacheStorageLocation(), "ModPacks/" + toRemove + ".xml"));
                        LaunchFrame.getInstance().modPacksPane.filterPacks();
                    } catch (IOException e) {
                        Logger.logError("Error while deleting private modpack", e);
                    }
                    Logger.logInfo(modpackName.getText() + " " + I18N.getLocaleString("PRIVATEPACK_SECCESS"));
                    modpackName.setText("");
                    setVisible(false);
                } else {
                    Logger.logInfo(I18N.getLocaleString("PRIVATEPACK_NOTEXISTS"));
                }
            }
        });
    }