public static void toggleButtonPanel(boolean makeVisible){
        buttonpannel.setVisible(makeVisible);
        mainFrame.invalidate();
        mainFrame.validate();
        mainFrame.repaint();
    }