public JScrollPane getGUI() {
        JPanel p999;
        
        GroupLayout groupLayout;
        GroupLayout.ParallelGroup horizontalGroup_P;
        GroupLayout.SequentialGroup verticalGroup_S;

        
        submitButton=new JButton("Create Section");
        submitButton.addActionListener(this);
        updateButton=new JButton("Update Section");
        updateButton.addActionListener(this);
        cancelButton=new JButton("Cancel");
        cancelButton.addActionListener(this);

        
        p999 = new JPanel();
         
        groupLayout = new GroupLayout(p999);
        groupLayout.setAutoCreateContainerGaps(true);
        groupLayout.setAutoCreateGaps(true);
        horizontalGroup_P = groupLayout.createParallelGroup(GroupLayout.Alignment.CENTER);
        verticalGroup_S = groupLayout.createSequentialGroup();
     
        horizontalGroup_P.addComponent(sectionPanel);
                
        
                

        verticalGroup_S.addComponent(sectionPanel);
        
        //when update shows the update button and when add shows the submit button
        if (isUpdate) {
            horizontalGroup_P.addGroup(groupLayout.createSequentialGroup()
                    .addComponent(updateButton)
                    .addComponent(cancelButton));
            verticalGroup_S.addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.CENTER)
                    .addComponent(updateButton)
                    .addComponent(cancelButton));
        }else{
            horizontalGroup_P.addGroup(groupLayout.createSequentialGroup()
                    .addComponent(submitButton)
                    .addComponent(cancelButton));
            verticalGroup_S.addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.CENTER)
                    .addComponent(submitButton)
                    .addComponent(cancelButton));
        }
                

        groupLayout.setHorizontalGroup(horizontalGroup_P);
        groupLayout.setVerticalGroup(verticalGroup_S);
        p999.setLayout(groupLayout);

        /*add p999 to a jscrollpane so that there will 
        **have a scroll bar when we cannot see all thw content
        */
        scrollPane=new JScrollPane(p999);
        scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
        
        
        
        return scrollPane;
    }