public Ch16Lab1(){
		
		JPanel panel = new JPanel(); // use the panel to group buttons
		panel.add(jbtEnlarge);
		panel.add(jbtShrink);
		
		JPanel panel2 = new JPanel(); // secondary panel to display total number of sides
		panel2.add(jlblNumberOfSides);
		panel2.add(jlblSidesTotal);
		
		
		add(canvas, BorderLayout.NORTH); // add canvas to top
		add(panel, BorderLayout.CENTER); // add button to the frame
		add(panel2, BorderLayout.SOUTH); // add the labels to the center

		
		jbtEnlarge.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				canvas.setNumberOfSides(canvas.getNumberOfSides() + 1);
				jlblSidesTotal.setText(""+canvas.getNumberOfSides()); // used to set the total sides text
				canvas.requestFocusInWindow();
			}
		});
		
		jbtShrink.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				canvas.setNumberOfSides(canvas.getNumberOfSides() - 1);
				if(canvas.getNumberOfSides() <= 3){
					JOptionPane.showMessageDialog(null, "You have reached the smallest " +
							"number of sides for it to still be a polygon.\n The number " +
							"of sides cannot decrease below 3");
					canvas.setNumberOfSides(3);
				}
				canvas.requestFocusInWindow();
				jlblSidesTotal.setText(""+canvas.getNumberOfSides());
			}
		});
		
		canvas.addMouseListener(new MouseAdapter(){
			public void mouseClicked(MouseEvent e){
				if(e.getButton() == MouseEvent.BUTTON1){
					canvas.setNumberOfSides(canvas.getNumberOfSides() + 1);
				jlblSidesTotal.setText(""+canvas.getNumberOfSides());
				}
				else if(e.getButton() == MouseEvent.BUTTON3){
					canvas.setNumberOfSides(canvas.getNumberOfSides() - 1);
				jlblSidesTotal.setText(""+canvas.getNumberOfSides());
				}
			}
		});
		
		canvas.setFocusable(true);
		canvas.requestFocusInWindow();
		
		canvas.addKeyListener(new KeyAdapter(){
			public void keyPressed(KeyEvent e){
				if (e.getKeyCode() == KeyEvent.VK_UP){
					canvas.setNumberOfSides(canvas.getNumberOfSides() + 1);
				jlblSidesTotal.setText(""+canvas.getNumberOfSides());
				}
				else if (e.getKeyCode() == KeyEvent.VK_DOWN){
					canvas.setNumberOfSides(canvas.getNumberOfSides() - 1);
				jlblSidesTotal.setText(""+canvas.getNumberOfSides());
				}
			}
		});
	}