public void setBorders(boolean b)
    {
        if (b)
            {
                for (int i=0; i<displayCells.length-1; i++)
                    {
                        for (int j=0; j<displayCells[0].length-1; j++)
                            {
                                displayCells[i][j].setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, Color.black));
                            }
                    }
                for  (int i=0; i<displayCells.length-1; i++)
                    {
                        displayCells[i][displayCells[0].length-1].setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.black));
                    }
                for  (int j=0; j<displayCells[0].length-1; j++)
                    {
                        displayCells[displayCells.length-1][j].setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, Color.black));
                    }
                borders = true;
            }                   
        else if (!b)
            {
                for (int i=0; i<displayCells.length; i++)
                    {
                        for (int j=0; j<displayCells[0].length; j++)
                            {
                                displayCells[i][j].setBorder(BorderFactory.createEmptyBorder());
                            }
                    }
                borders = false;
            }
    }