public void actionPerformed(ActionEvent arg0) {
		String s = null;
		if (m_urlOrHostip == null) {
			s = (String) JOptionPane
					.showInputDialog(
							MainDialog.getWindow(),
							"Enter a Hostname, Hostname:Port, IP, IP:Port or HTTP-URL of a p300 node",
							"Manually add host", JOptionPane.PLAIN_MESSAGE,
							null, null, null);
		} else {
			s = m_urlOrHostip;
		}

		if (s != null && s.trim().length() > 0) {
			if (s.startsWith("http://")) {
				try {
					URL u = new URL(s);

					String host = u.getHost();
					int port = u.getPort();
					if (port == -1)
						port = 4337;

					askHost(host + ":" + port);

				} catch (Exception e) {
					e.printStackTrace();
				}
			} else if (IP.matchesIPorHostnamePort(s)) {
				// ip:port or hostname:port
				askHost(s);
			} else if (!s.contains(":")) {
				// ip or host
				askHost(s + ":4337");
			} else {
				if (m_urlOrHostip == null)
					JOptionPane.showMessageDialog(MainDialog.getWindow(),
							"Sorry, invalid input");
			}
		}

	}