public void drawGrid(Graphics g) {
		Graphics2D g2d = (Graphics2D)g.create();
		for (int r = 0; r < data.length; r++) {
			for (int c = 0; c < data[r].length; c++) {
				// change color according to the cell state
				switch (data[r][c]) {
				case TetrisBoard.EMPTY:
					g2d.setColor(Color.DARK_GRAY);
					break;
				case TetrisBoard.FILLED:
					g2d.setColor(Color.GRAY);
					break;
				case TetrisBoard.MOVING:
					g2d.setColor(pieceQueue.peek().getColor());
					break;
				}
				g2d.fill3DRect(boxWidth * c + PADDING, boxWidth * r + PADDING, boxWidth - PADDING, boxWidth - PADDING, true);
			}
		}
		g2d.dispose();
	}