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

		setupGui();

		getRootPane().setDefaultButton(add);

		add.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				if(DownloadUtils.staticFileExists(modpackName.getText() + ".xml") && !modpackName.getText().isEmpty() && !Settings.getSettings().getPrivatePacks().contains(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_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();
				if(codes.contains(modpackName.getText())) {
					Settings.getSettings().removePrivatePack(modpackName.getText());
					Settings.getSettings().save();
					try {
						for(ModPack pack : ModPack.getPackArray()) {
							if(pack.getParentXml().equalsIgnoreCase(modpackName.getText() + ".xml")) {
								FileUtils.delete(new File(OSUtils.getDynamicStorageLocation(), "ModPacks/" + pack.getDir()));
								break;
							}
						}
						ModPack.removePacks(modpackName.getText() + ".xml");
						FileUtils.delete(new File(OSUtils.getDynamicStorageLocation(), "ModPacks/" + modpackName.getText() + ".xml"));
						LaunchFrame.getInstance().modPacksPane.sortPacks();
					} catch (IOException e) {
						e.printStackTrace();
					}
					Logger.logInfo(modpackName.getText() + " " + I18N.getLocaleString("PRIVATEPACK_SECCESS"));
					modpackName.setText("");
					setVisible(false);
				} else {
					Logger.logInfo(I18N.getLocaleString("PRIVATEPACK_NOTEXISTS"));
				}
			}
		});
	}