private void setupGUI(Polygon polygon) {
		setLayout(new BorderLayout());
		
		polygonPanel = new PolygonPanel(polygon);
		add(polygonPanel,BorderLayout.CENTER);
		
		JPanel eastPanel = new JPanel(new BorderLayout());
		
		polygonListModel = new PolygonListModel(polygon);
		polygonList = new JList(polygonListModel);
		polygonList.addListSelectionListener(new ListSelectionListener() {
			@Override
			public void valueChanged(ListSelectionEvent arg0) {
				if(polygonList.getSelectedIndex() == -1)
					return;
				
				polygonPanel.setSelectedVertex(polygonList.getSelectedIndex());
				
				newPointField.setText(polygonList.getSelectedValue().toString());
			}
		});
		polygonList.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				if(e.getButton() == 1 && e.getClickCount() == 2 && polygonList.getSelectedIndex() != -1) {
					modifyPoint(null);
				}
			}
		});
		
		polygonList.setPreferredSize(new Dimension(100,100));
		
		eastPanel.add(polygonList, BorderLayout.CENTER);
		
		newPointField = new JTextField();
		newPointField.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				final String newPointString = arg0.getActionCommand();
				final String[] div = newPointString.split(",");
				
				try {
					final int x = Integer.valueOf(div[0].trim());
					final int y = Integer.valueOf(div[1].trim());
					
					modifyPoint(new Point(x,y));
				} catch (NumberFormatException e) {
					// TODO: handle exception
					e.printStackTrace();
				} catch (ArrayIndexOutOfBoundsException e) {
					// TODO: handle exception
					e.printStackTrace();
				}
				
			}
		});
		
		eastPanel.add(newPointField, BorderLayout.SOUTH);
		
		add(eastPanel, BorderLayout.WEST);
	}