public void buildGui(Calculator calculator) {
		this.calculator = calculator;
		JFrame aFrame = new JFrame(TITLE);

		// Create a the main panel, with 4 lines
		JPanel mainPanel = new JPanel(new GridLayout(6, 1));

		JPanel gridLines[] = { new JPanel(new GridLayout(1, 5)),
				new JPanel(new GridLayout(1, 5)),
				new JPanel(new GridLayout(1, 5)),
				new JPanel(new GridLayout(1, 5)),
				new JPanel(new GridLayout(1, 5)),
				new JPanel(new GridLayout(1, 5)), };
		aFrame.getContentPane().add(mainPanel);

		aFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		aFrame.setSize(FRAME_SIZE_X, FRAME_SIZE_Y);
		aFrame.setResizable(false);

		// Line 1
		inputText.setFont(TEXT_FONT);
		gridLines[0].add(inputText);

		// Line 2
		resultText.setHorizontalAlignment(JTextField.CENTER);
		resultText.setFont(TEXT_FONT);
		resultText.setFocusable(false);
		resultText.setBackground(BUTTON_COLOR);
		gridLines[1].add(resultText);

		// Line 3, add the JButtons for the numbers 1 to 3 and "/"
		for (int i = 1; i <= 3; ++i) {
			createButton(gridLines[2], Integer.toString(i));
		}
		createButton(gridLines[2], "/");

		// Line 4, add the JButtons for the numbers 4 to 6 and "*"
		for (int i = 4; i <= 6; ++i) {
			createButton(gridLines[3], Integer.toString(i));
		}
		createButton(gridLines[3], "*");

		// Line 5, add the JButtons for the numbers 7 to 9 and "-"
		for (int i = 7; i <= 9; ++i) {
			createButton(gridLines[4], Integer.toString(i));
		}
		createButton(gridLines[4], "-");

		// Line 6, add 2 empty JPanels and the JButtons for "=" and "+"
		JPanel tempPanel = null;
		for (int i = 1; i <= 2; ++i) {
			tempPanel = new JPanel();
			tempPanel.setBackground(BANANA);
			gridLines[5].add(tempPanel);
		}

		JButton equalsButton = new JButton("=");
		equalsButton.addActionListener(new MyEqualsListener());
		styleAndAdd(gridLines[5], equalsButton);
		createButton(gridLines[5], "+");

		for (JPanel gridLine : gridLines) {
			mainPanel.add(gridLine);
		}
		mainPanel.setBorder(MAIN_PANEL_BORDER);
		mainPanel.setBackground(BANANA);

		aFrame.pack();
		aFrame.setLocationRelativeTo(null);
		aFrame.setVisible(true);
	}