private void defineButton() {
		addButton = new JButton("Add");
		clearButton = new JButton("Clear");

		addButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				int size = Integer.parseInt(sizeField.getText());
				int startX = startXSlider.getValue();
				int startY = startYSlider.getValue();
				float red = redSlider.getValue() / (float) 255;
				float green = greenSlider.getValue() / (float) 255;
				float blue = blueSlider.getValue() / (float) 255;
				Directions direction;

				switch (directionPicker.getSelectedIndex()) {
					case 0:
						direction = Directions.UP;
						break;
					case 1:
						direction = Directions.DOWN;
						break;
					case 2:
						direction = Directions.LEFT;
						break;
					case 3:
						direction = Directions.RIGHT;
						break;
					default:
						direction = Directions.UP;
				}

				int speed = Integer.parseInt(speedField.getText());

				Main.addSquare(new Square(size, startX, startY, red, green, blue, direction, speed));
			}
		});

		clearButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				Main.clearSquares();
			}
		});
	}