private void buildGUI() {
		frame = new JFrame("Preferences");
		JPanel mainPanel = new JPanel();
		mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		mainPanel.setLayout(new BorderLayout());
		JPanel gravityPanel = new JPanel();
		gravityPanel.setBorder(BorderFactory.createTitledBorder("Gravity"));
		GridLayout layout = new GridLayout(2, 2);
		layout.setHgap(5);
		layout.setVgap(5);
		gravityPanel.setLayout(layout);
		gravityPanel.add(new JLabel("Gravity"));
		gravity = new JCheckBox("Enable Gravity");
			gravity.addActionListener(new ButtonListener());
			gravity.setSelected(false);
		gravityPanel.add(gravity);
		gravityLabel = new JLabel("Gravity Delay: 1000 ms");
		gravityPanel.add(gravityLabel);
		gravityDelay = new JSlider();
			gravityDelay.addChangeListener(new GravityListener());
			gravityDelay.setMinimum(50); //NOTE: In my opinion, minimum should be lower.
			gravityDelay.setMaximum(2500);
			gravityDelay.setMajorTickSpacing(200);
			gravityDelay.setMinorTickSpacing(100);
			gravityDelay.setValue(1000);
			gravityDelay.setSnapToTicks(true);
			gravityDelay.setPaintTicks(true);
			gravityDelay.setEnabled(false);
		gravityPanel.add(gravityDelay);
		JPanel generalOptions = new JPanel();
			generalOptions.setBorder(BorderFactory.createTitledBorder("General"));
			generalOptions.setLayout(new GridLayout(7, 1));
			fpsStatus = new JCheckBox("Show FPS on status bar");
			fpsStatus.setSelected(true);
			generalOptions.add(fpsStatus);
			autoScroll = new JCheckBox("Enable Autoscroll");
			autoScroll.addActionListener(new ButtonListener());
			autoScroll.setSelected(true);
			generalOptions.add(autoScroll);
			generalOptions.add(new JLabel("Unit size:"));
			unitSlider = new JSlider();
				unitSlider.setMinimum(5);
				unitSlider.setMaximum(200);
				unitSlider.setMajorTickSpacing(50);
				unitSlider.setMinorTickSpacing(5);
				unitSlider.setValue(25);
				unitSlider.setPaintTicks(true);
				unitSlider.setSnapToTicks(true);
				unitSlider.addChangeListener(new UnitListener());
				unitSlider.addMouseListener(new UnitListener());
			generalOptions.add(unitSlider);
			refresh = new JCheckBox("Refresh Screen");
			refresh.addActionListener(new ButtonListener());
			refresh.setSelected(true);
			generalOptions.add(refresh);
			refreshLabel = new JLabel("?");
			generalOptions.add(refreshLabel);
			refreshSlider = new JSlider();
				refreshSlider.addChangeListener(new RefreshListener());
				refreshSlider.setMinimum(250);
				refreshSlider.setMaximum(1000);
				refreshSlider.setMajorTickSpacing(100);
				refreshSlider.setMinorTickSpacing(25);
				refreshSlider.setValue(1000);
				refreshSlider.setSnapToTicks(true);
				refreshSlider.setPaintTicks(true);
			generalOptions.add(refreshSlider);
		JPanel debugOptions = new JPanel();
			debugOptions.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
			debugOptions.setLayout(new BoxLayout(debugOptions, BoxLayout.Y_AXIS));
			debugOptions.add(new JLabel("Debugging"));
			gravityDebugStatus = new JCheckBox("Gravity debug info on status bar");
			gravityDebugStatus.addActionListener(new ButtonListener());
			debugOptions.add(gravityDebugStatus);
			autoscrollStatus = new JCheckBox("Autoscroll on/off on status bar");
			autoscrollStatus.addActionListener(new ButtonListener());
			debugOptions.add(autoscrollStatus);
			gravityOnStatus = new JCheckBox("Gravity on/off on status bar");
			gravityOnStatus.addActionListener(new ButtonListener());
			debugOptions.add(gravityOnStatus);
			printMouseCoords = new JCheckBox("Print mouse coordinates to System.out");
			printMouseCoords.addActionListener(new ButtonListener());
			debugOptions.add(printMouseCoords);
			verbose = new JCheckBox("Debug info to System.out");
			verbose.addActionListener(new ButtonListener());
			debugOptions.add(verbose);
		cheatPanel = new JPanel();
			daniel = new JCheckBox("???");
			daniel.addActionListener(new ButtonListener());
			daniel.setEnabled(false);
			daniel.setVisible(false);
			lulz = new JCheckBox("???");
			lulz.addActionListener(new ButtonListener());
			lulz.setEnabled(false);
			lulz.setVisible(false);
			kaboom = new JCheckBox("???");
			kaboom.addActionListener(new ButtonListener());
			kaboom.setEnabled(false);
			kaboom.setVisible(false);
			cheatPanel.add(daniel);
			cheatPanel.add(kaboom);
			cheatPanel.add(lulz);
		mainPanel.add(gravityPanel, BorderLayout.NORTH);
		mainPanel.add(cheatPanel, BorderLayout.SOUTH);
		mainPanel.add(generalOptions, BorderLayout.EAST);
		mainPanel.add(debugOptions, BorderLayout.WEST);
		frame.getContentPane().add(mainPanel, BorderLayout.CENTER);
		frame.setBounds(Helper.getCenteredBounds(500, 350));
	}