public void paint(Graphics g) {
		super.paintComponent(g);
		Graphics2D graphics_2d = (Graphics2D) g;
		//draw the chess board
		graphics_2d.setColor(new Color(0,0,0));
		graphics_2d.drawRect(0,0,600,600);
		graphics_2d.setColor(new Color(128,121,124));

		for(int i = 0; i < 500; i += 150) {
			for(int k = 75; k <= 525; k += 150) {
				graphics_2d.fillRect(k, i, 75, 75);
			}
		}
		for(int i = 75; i <= 525; i += 150) {
			for(int k = 0; k < 500; k += 150) {
				graphics_2d.fillRect(k, i, 75, 75);
			}
		}
		if(highlighted_piece) {
			graphics_2d.setColor(new Color(255,0,0));
			int rectX = (highlighted_x_square-1)*75;
			int rectY = (8-highlighted_y_square)*75;
			graphics_2d.fillRect(rectX, rectY, 75, 75);
		}
		
		//draw white pieces
		for(int i = 0; i < white_pieces.size(); i++) {
			BoardPiece board_piece = white_pieces.get(i);
			//set file name string
			StringBuffer name_buffer = new StringBuffer(board_piece.piece_type);
			name_buffer.append("_white.png");
			String name = name_buffer.toString();
			Image piece_image = new ImageIcon(this.getClass().getResource(name)).getImage();
			//set coordinates for the piece on the screen
			int xCord = (board_piece.xCoord-1)*75+18;
			int yCord = (8-board_piece.yCoord)*75+18;
			graphics_2d.drawImage(piece_image, xCord, yCord, null);
		}
		
		//draw black pieces
		for(int i = 0; i < black_pieces.size(); i++) {
			BoardPiece board_piece = black_pieces.get(i);
			//set file name string
			StringBuffer name_buffer = new StringBuffer(board_piece.piece_type);
			name_buffer.append("_black.png");
			String name = name_buffer.toString();
			Image image = new ImageIcon(this.getClass().getResource(name)).getImage();
			//set coordinates for the piece on the screen
			int xCord = (board_piece.xCoord-1)*75+18;
			int yCord = (8-board_piece.yCoord)*75+18;
			graphics_2d.drawImage(image, xCord, yCord, null);
		}
		graphics_2d.setColor(new Color(0,0,0));
		if(move_whites) {
			graphics_2d.drawString("White's move.", 20, 620);
		}
		else {
			graphics_2d.drawString("Black's move.", 20, 620);
		}
	}