@Override
	public void actionPerformed(ActionEvent arg0) {
		String btn = arg0.getActionCommand();
		
		if (btn == "Send") {
			new Send(txtField.getText());
			txtField.setText("");
		}
		
		if (btn == "Config") {
			if (configToggled) {
				Retract();
				configToggled = false;
			} else {
				Extend();
				configToggled = true;
			}
		}
		
		if (btn == "Save") {
			if (!JServer.debug) {
				if (Integer.parseInt(otxtField1.getText()) >= 1 && Integer.parseInt(otxtField1.getText()) <= 65535) {
					if (Integer.parseInt(otxtField3.getText()) > 0) {
						JServer.serverPort = Integer.parseInt(otxtField1.getText());
						JServer.serverName = otxtField2.getText();
						JServer.serverMaxusers = Integer.parseInt(otxtField3.getText());
						
						FileWrite.WriteConfig();
						if (PopupManager.AskClose("Server settings saved, close server?", "Settings saved") == 0) {
							System.exit(0);
						}
					}
				}
			} else {
				PopupManager.GiveWarning("Can not save while in debug mode");
			}
		}
	}