public GUI(){

		node1 = new Point();
		node2 = new Point();
		ButtonGroup b = new ButtonGroup();
		partSelection1 = new JRadioButton();
		partSelection1.setText("PART 1");
		b.add(partSelection1);

		partSelection2 = new JRadioButton();
		partSelection2.setText("PART 2");
		b.add(partSelection2);

		partSelection1.setSelected(true);
		partSelection2.setSelected(false);

		add(partSelection1);
		add(partSelection2);

		sim1 = new JButton();
		sim1.setText("sim1");
		sim1.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e)
			{
				int nodeNum = 0;
				if(partSelection2.isSelected()){
					tl.part = 1;
					nodeNum = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter number of sensors (MAX 100) : ", "Settings", 1));
				}else if(partSelection1.isSelected()){
					nodeNum = 2;
					tl.part = 0;
				}


				tl.numNodes = nodeNum;

				start = true;
				sensorCover = new Shape[nodeNum];
				sensor = new Shape[nodeNum];
				range = tl.range;
				stop.setEnabled(true);
				tl.runSim();
				sw = new StopWatch();
			}
		});
		sim1.setSize(50, 50);
		add(sim1);

		sim2 = new JButton();
		sim2.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e)
			{
				int nodeNum;
				if(partSelection2.isSelected()){
					tl.part = 1;
					nodeNum = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter number of sensors (MAX 100) : ", "Settings", 1));
				}else{
					nodeNum = 2;
					tl.part = 0;
				}
				tl.numNodes = nodeNum;
				start = true;
				sensorCover = new Shape[nodeNum];
				sensor = new Shape[nodeNum];
				range = tl.range;
				start = true;
				stop.setEnabled(true);
				tl.runSim2();
				sw = new StopWatch();

				tl.calForLog(sw);
				try {
					tl.writeFile();
				} catch (IOException e2) {
					// TODO Auto-generated catch block
					e2.printStackTrace();
				}
				tl.clearLog();
			}
		});
		sim2.setText("sim2");
		sim2.setSize(50, 50);
		add(sim2);

		sim3 = new JButton();
		sim3.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e)
			{
				int nodeNum;
				if(partSelection2.isSelected()){
					tl.part = 1;
					nodeNum = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter number of sensors (MAX 100) : ", "Settings", 1));
				}else{
					nodeNum = 2;
					tl.part = 0;
				}
				tl.numNodes = nodeNum;
				start = true;
				sensorCover = new Shape[nodeNum];
				sensor = new Shape[nodeNum];
				range = tl.range;
				start = true;
				stop.setEnabled(true);
				tl.runSim3();
				sw = new StopWatch();

				tl.calForLog(sw);
				try {
					tl.writeFile();
				} catch (IOException e2) {
					// TODO Auto-generated catch block
					e2.printStackTrace();
				}
				tl.clearLog();
			}
		});
		sim3.setText("sim3");
		sim3.setSize(50, 50);
		add(sim3);

		stop = new JButton();
		stop.setEnabled(false);
		stop.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e)
			{
				simRunning();
				sigStopped = true;
				stop.setEnabled(false);

				tl.calForLog(sw);
				try {
					tl.writeFile();
				} catch (IOException e2) {
					// TODO Auto-generated catch block
					e2.printStackTrace();
				}
				tl.clearLog();
			}
		});
		stop.setText("STOP");
		stop.setSize(50, 50);

		add(stop);
		stop.setLocation(400, 400);


		setBackground(Color.WHITE);
		setPreferredSize(new Dimension(500, 500));
		setVisible(true);

	}