private JPanel createMatrixPanel() {
        JPanel panel = new JPanel();
        for (int i = 0; i < bMatrix.length; i++) {
            for (int j = 0; j < bMatrix[0].length; j++) {
                panel.add(bMatrix[i][j]);
            }
        }
        return panel;
    }