public void actionPerformed(ActionEvent event) {
		if (event.getSource() == closeConnection) {
			if (socket != null) {
				try {
					socket.close();
				} catch (IOException ioEx) {
					System.out.println("\n* Unable to close link!*\n");
					System.exit(1);
				}
				lineToSend.setEditable(false);
				hostInput.grabFocus();
			}
			return;
		}

		if (event.getSource() == openConnection && !hostInput.getText().equals("")) {
			try {
				received.append("Connecting to " + hostInput.getText() + "...");
				socket = new Socket(hostInput.getText(), ECHO);
				input = new Scanner(socket.getInputStream());
				output = new PrintWriter(socket.getOutputStream());
				if (socket!=null) {
					received.append("The date/time at " + hostInput.getText() + " is " + input.nextLine() + "\n");
				}
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
	}