private Window()
	{
		baseFrame = new JFrame("TEST");
		baseFrame.setLayout(new GridBagLayout());
		
		baseFrame.setSize(200, 300);
		baseFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		baseFrame.addWindowListener(new WindowListener(){

			@Override
			public void windowActivated(WindowEvent arg0)
			{
			}

			@Override
			public void windowClosed(WindowEvent arg0)
			{
			}

			@Override
			public void windowClosing(WindowEvent arg0)
			{
				Receiver.stop();
			}

			@Override
			public void windowDeactivated(WindowEvent arg0)
			{
			}

			@Override
			public void windowDeiconified(WindowEvent arg0)
			{
			}

			@Override
			public void windowIconified(WindowEvent arg0)
			{
			}

			@Override
			public void windowOpened(WindowEvent arg0)
			{
			}
		});
		
		GridBagConstraints c = new GridBagConstraints();
		c.gridx = 0;
		c.gridy = 0;
		c.gridwidth = 3;
		c.gridheight = 2;
		c.anchor = GridBagConstraints.FIRST_LINE_START;
		
		Container content = baseFrame.getContentPane();
		
		textPane = new JTextPane();
		textPane.setForeground(Color.white);
		attributes = new SimpleAttributeSet();
		
		StyleConstants.setForeground(attributes, Color.WHITE);
		textPane.setBackground(Color.black);
		
		doc = textPane.getStyledDocument();
		
		
		scrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		scrollPane.add(textPane);
		scrollPane.setViewportView(textPane);
		textPane.setEditable(false);
		textPane.setText("\n\n\n\n\n");
		
		Dimension textPaneMax = new Dimension();
		textPaneMax.height = 100;
		textPaneMax.width = 275;
		
		scrollPane.setMaximumSize(textPaneMax);
		textPane.setMaximumSize(textPaneMax);
		
		Dimension textPaneMin = new Dimension();
		textPaneMin.height = 100;
		textPaneMin.width = 300;
		textPane.setMinimumSize(textPaneMin);
		scrollPane.setPreferredSize(textPaneMin);
		scrollPane.setMinimumSize(textPaneMin);
		scrollPane.setSize(textPaneMin);
		scrollPane.setAutoscrolls(true);
		
		content.add(scrollPane, c);
		
		c.gridy = 3;
		c.gridheight = 1;
		c.gridwidth = 3;
		c.anchor = GridBagConstraints.LAST_LINE_START;
		
		JLabel chatBoxLabel = new JLabel("Chat:");
		
		content.add(chatBoxLabel, c);
		
		c.gridy = 4;
		c.anchor = GridBagConstraints.PAGE_END;
		
		final JTextArea textBox = new JTextArea(1, 3);
		
		Dimension textBoxDimen = new Dimension();
		textBoxDimen.width = 250;
		textBox.setPreferredSize(textBoxDimen);
		
		 @SuppressWarnings("serial")
		Action moveToSelectionStart = new AbstractAction("moveCaret") {

		        @Override
		        public void actionPerformed(ActionEvent e) {
		            int selectionStart = textBox.getSelectionStart();
		            int selectionEnd = textBox.getSelectionEnd();
		            if (selectionStart != selectionEnd) {
		                textBox.setCaretPosition(selectionEnd);
		                textBox.moveCaretPosition(selectionStart);
		            }
		        }

		        public boolean isEnabled() {
		            return textBox.getSelectedText() != null;
		        }
		    };
		    Object actionMapKey = "caret-to-start";
		    textBox.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), actionMapKey);
		    textBox.getActionMap().put(actionMapKey, moveToSelectionStart);
		
		textBox.addKeyListener(new KeyListener(){

			@Override
			public void keyPressed(KeyEvent e)
			{
				if (e.getKeyCode() == KeyEvent.VK_ENTER)
				{
					Data data = new Data(textBox.getText(), username, StyleConstants.getForeground(attributes));

					if (data.toString().equals("\n"))
					{
						return;
					}
					
					if (data.toString().startsWith("\n"))
						data.setData(data.toString().split("\n")[1]);
					
					if (data.toString().endsWith("\n"))
						data.setData(data.toString().split("\n")[0]);
					
					
					if (data != null)
					{
						Connection.sendData(data);
					}

					textBox.setText("");
				}
			}

			@Override
			public void keyReleased(KeyEvent ignored)
			{
			}

			@Override
			public void keyTyped(KeyEvent ignored)
			{
				
			}
			
		});
		content.add(textBox, c);
			
		
		baseFrame.setLocationRelativeTo(null);
		baseFrame.pack();
	}