public ChatWindow() throws IOException {
		setSize(500, 600);
		setLocationRelativeTo(null);
		setTitle("Chat");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		chatHistory = new JTextArea();
		chatHistory.setEditable(false);

		chatText = new JTextField(500);
		chatText.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				String chat = chatText.getText();
				chatHistory.setForeground(Color.BLACK);
				chatHistory.append("\n" + chat);
				try {
					new ChatClient(chat);
				} catch (IOException ex) {

					ex.printStackTrace();
				}

				chatText.setText("");

			}

		});

		add(chatHistory, BorderLayout.CENTER);
		add(chatText, BorderLayout.SOUTH);

		//ChatServer server = new ChatServer(this);
		//server.start();
	}