public JPanel setUpToolsPanel() {
		// Set up the shape combo box
		ImageIcon squareButtonIcon = createImageIcon("square.gif");
		ImageIcon rectangleButtonIcon = createImageIcon("rectangle.gif");
		ImageIcon rightAngleButtonIcon = createImageIcon("rightAngle.gif");
		JComboBox<ImageIcon> shapesComboBox = new JComboBox<ImageIcon>(
				new ImageIcon[] { rectangleButtonIcon, squareButtonIcon,
						rightAngleButtonIcon, });
		shapesComboBox.setToolTipText("Set shape");
		shapesComboBox.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JComboBox cb = (JComboBox) e.getSource();
				// set the Current shape type based on the selection: 0 for
				// Circle, 1 for Rectangle etc
				panel.setCurrentShapeType(cb.getSelectedIndex());
			}
		});
		// Set up the path combo box
		ImageIcon boundaryButtonIcon = createImageIcon("boundary.gif");
		ImageIcon fallingButtonIcon = createImageIcon("falling.gif");
		JComboBox<ImageIcon> pathComboBox = new JComboBox<ImageIcon>(
				new ImageIcon[] { boundaryButtonIcon, fallingButtonIcon });
		pathComboBox.setToolTipText("Set Path");
		pathComboBox.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JComboBox cb = (JComboBox) e.getSource();
				// set the Current path type based on the selection from combo
				// box: 0 for Boundary Path, 1 for bouncing Path
				panel.setCurrentPathType(cb.getSelectedIndex());
			}
		});
		// Set up the height TextField
		JTextField heightTxt = new JTextField("20");
		heightTxt.setToolTipText("Set Height");
		heightTxt.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JTextField tf = (JTextField) e.getSource();
				try {
					int newValue = Integer.parseInt(tf.getText());
					if (newValue > 0) // if the value is valid, then change the
										// current height
						panel.setCurrentHeight(newValue);
					else
						tf.setText(panel.getCurrentHeight() + "");
				} catch (Exception ex) {
					System.err.println("Exception: " + ex.getMessage());

					tf.setText(panel.getCurrentHeight() + ""); // if the number
																// entered is
																// invalid,
																// reset it
				}
			}
		});
		// Set up the width TextField
		JTextField widthTxt = new JTextField("50");
		widthTxt.setToolTipText("Set Width");
		widthTxt.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JTextField tf = (JTextField) e.getSource();
				try {
					int newValue = Integer.parseInt(tf.getText());
					if (newValue > 0)
						panel.setCurrentWidth(newValue);
					else
						tf.setText(panel.getCurrentWidth() + "");
				} catch (Exception ex) {
					System.err.println("Exception: " + ex.getMessage());

					tf.setText(panel.getCurrentWidth() + "");
				}
			}
		});
		// added
		JTextField dashedLineLength = new JTextField("3.0f");
		dashedLineLength.setToolTipText("Set dished line Length");
		dashedLineLength.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JTextField tf = (JTextField) e.getSource();

				try {
					float newValue = Float.parseFloat(tf.getText());
					if (newValue > 0)
						panel.setLength(newValue);
					else
						tf.setText(panel.getLength() + "");
				} catch (Exception ex) {

					System.err.println("Exception: " + ex.getMessage());

					tf.setText(panel.getLength() + "");
				}

			}
		});
		// added
		JTextField seperation = new JTextField("3.0f");
		seperation.setToolTipText("Set Seperation");
		seperation.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JTextField tf = (JTextField) e.getSource();
				try {
					float newValue = Float.parseFloat(tf.getText());
					if (newValue > 0)
						panel.setSeperation(newValue);
					else
						tf.setText(panel.getSeperation() + "");
				} catch (Exception ex) {
					System.err.println("Exception: " + ex.getMessage());
					tf.setText(panel.getSeperation() + "");
				}
			}
		});
		// added
		/*
		 * JTextField radius = new JTextField("3.0f");
		 * radius.setToolTipText("Set Seperation"); radius.addActionListener(new
		 * ActionListener() { public void actionPerformed(ActionEvent e) {
		 * JTextField tf = (JTextField) e.getSource(); try { int newValue =
		 * Integer.parseInt(tf.getText()); if (newValue > 0)
		 * panel.setSeperation(newValue); else tf.setText(panel.getSeperation()
		 * + ""); } catch (Exception ex) { System.err.println("Exception: " +
		 * ex.getMessage());
		 * 
		 * tf.setText(panel.getSeperation() + ""); } } });
		 */

		JPanel toolsPanel = new JPanel();
		toolsPanel.setLayout(new BoxLayout(toolsPanel, BoxLayout.X_AXIS));
		toolsPanel.add(new JLabel(" Shape: ", JLabel.RIGHT));
		toolsPanel.add(shapesComboBox);
		toolsPanel.add(new JLabel(" Path: ", JLabel.RIGHT));
		toolsPanel.add(pathComboBox);
		toolsPanel.add(new JLabel(" Height: ", JLabel.RIGHT));
		toolsPanel.add(heightTxt);
		toolsPanel.add(new JLabel(" Width: ", JLabel.RIGHT));
		toolsPanel.add(widthTxt);
		//
		toolsPanel.add(new JLabel(" Length ", JLabel.RIGHT));
		toolsPanel.add(dashedLineLength);
		//
		toolsPanel.add(new JLabel(" Seperation ", JLabel.RIGHT));
		toolsPanel.add(seperation);

		return toolsPanel;
	}