public static void removePanel() {
        if(e == null){
            return;
        }else{
            mainFrame.remove(e);
            mainFrame.invalidate();
            mainFrame.validate();
            mainFrame.repaint();
        }
    }