@Override
	public void buttonClicked(ButtonEvent event) {
		switch (event.getButton().getType()) {
		case SERVER:
			if (event.getButton().isActive())
				networkHandler.shutDown();
			else
				networkHandler.startServer(port);
			break;
		case CLIENT:
			if (event.getButton().isActive())
				networkHandler.shutDown();
			else
				networkHandler.startClient(hostname, port);
			break;
		case SUBMIT:
			updateConfig(event);
			toggleOptions();
			break;
		case OPTIONS:
			toggleOptions();
			break;
		}
	}