public JScrollPane getGUI(){
        JPanel p1=new JPanel();
        
        getExam();
        
        GroupLayout groupLayout=new GroupLayout(p1);
        groupLayout.setAutoCreateContainerGaps(true);
        groupLayout.setAutoCreateGaps(true);
        GroupLayout.ParallelGroup horizontalGroup_P = groupLayout.createParallelGroup(GroupLayout.Alignment.CENTER);
        GroupLayout.SequentialGroup verticalGroup_S = groupLayout.createSequentialGroup();
        
        for (int i = 0; i < sections.size(); i++) {
            SectionPanel_Preview sectionPanel=new SectionPanel_Preview(exam_ID);
            sectionPanel.getGUI(((Section)sections.get(i)).getSection_ID());
            
            horizontalGroup_P.addComponent(sectionPanel);
            verticalGroup_S.addComponent(sectionPanel);
            
        }
     
        
        
        
                

        groupLayout.setHorizontalGroup(horizontalGroup_P);
        groupLayout.setVerticalGroup(verticalGroup_S);
        p1.setLayout(groupLayout);
        JScrollPane scrollPane=new JScrollPane(p1);
        scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
        
        return scrollPane;

    }