public void actionPerformed(ActionEvent action) {
		if(action.getSource().equals(connect)) {

			int desired = 48;
			try {			
				pf.setString("connect_hostname", serverName.getText());
				pf.setInt("connect_port", Integer.parseInt(portNum.getText()));
				pf.setInt("listen_port", Integer.parseInt(localServerPortnum.getText()));
				try {
					desired = Integer.parseInt(desiredSize.getText());
				} catch (NumberFormatException nfe) {
					desired = 48;
					desiredSize.setText("48");
				}
				pf.setInt("cache_size", desired);
				desiredSize.setEditable(false);
				pf.save();
			} catch (NumberFormatException nfe) {
			}

			if(serverMainThread == null || !serverMainThread.isAlive()) {

				safeSetButton("Stop");

				final String distantServer = serverName.getText() + ":" + portNum.getText();
				final String localServer = localServerPortnum.getText();
				final String cacheSize = Integer.toString(desired * 1024 * 1024);

				serverMainThread = new Thread(new Runnable() {

					public void run() {

						String[] args = {
								localServer,
								distantServer,
								"local_cache",
								"quiet",
								"bridge_connection",
								"cache_limit",
								cacheSize
						};

						Main.main(args, false);
					}

				});

				serverMainThread.start();

			} else {
				safeSetButton("Stopping");
				serverMainThread.interrupt();
				desiredSize.setEditable(true);
			}
		}
	}