The following code is part of my GUI.

Java Code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import static javax.swing.GroupLayout.Alignment.*;

public class GUI extends JFrame
{
    private Container container;
    private JTabbedPane tabbedPane;
    private JPanel mainPanel;
    public JComponent projectPanel;
    private JButton addProject;
    private GroupLayout layout; 
 
    public static void main(String[] args)
    {
        JFrame frame = new GUI();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
    
    public GUI()
    {     
        setTitle("RMS");
        mainPanel = new JPanel();
        container = getContentPane();     
        tabbedPane = new JTabbedPane();
        tabbedPane.setPreferredSize(new Dimension(400,400));
        tabbedPane.setBackground(Color.white);
        projectPanel = makeProjectPanel();
        projectPanel.setBorder(BorderFactory.createTitledBorder("Options"));        
        tabbedPane.addTab("Project", projectPanel);
        container.add(mainPanel);
        mainPanel.add(tabbedPane);
        tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        pack();
    }
    
    protected JComponent makeProjectPanel()
    {
        JPanel panel = new JPanel();
        tabbedPane.setPreferredSize(new Dimension(400,400));
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        
        addProject = new JButton("Add Project");
        addProject.addActionListener(new ActionListener()
        {
           public void actionPerformed(ActionEvent e)
           {
                createNewProject();
           }
        });
            
        addProject.setMaximumSize(new Dimension(210,30));
        addProject.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(addProject);
        panel.add(Box.createRigidArea(new Dimension(0,30)));
        JButton editProject = new JButton("Edit Project");
        editProject.setMaximumSize(new Dimension(210,30));
        editProject.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(editProject);
        panel.add(Box.createRigidArea(new Dimension(0,30)));
        JButton removeProject = new JButton("Remove Project");
        removeProject.setMaximumSize(new Dimension(210,30));
        removeProject.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(removeProject);
        panel.add(Box.createRigidArea(new Dimension(0,30)));
        JButton listProject = new JButton("List Projects");
        listProject.setMaximumSize(new Dimension(210,30));
        listProject.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(listProject);   
                panel.add(Box.createRigidArea(new Dimension(0,30)));
        JButton assignReference = new JButton("Assigned Reference to Project");
        assignReference.setMaximumSize(new Dimension(210,30));
        assignReference.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(assignReference);
                panel.add(Box.createRigidArea(new Dimension(0,30)));
        JButton addNote = new JButton("Add Note to Project");
        addNote.setMaximumSize(new Dimension(210,30));
        addNote.setAlignmentX(Component.CENTER_ALIGNMENT);
        panel.add(addNote);
      
      return panel;

    }
    
    public void createNewProject()
    {
        projectPanel.removeAll();
        projectPanel.setBorder(BorderFactory.createTitledBorder(""));
        tabbedPane.setPreferredSize(new Dimension(560, 430));
        JPanel panel = new JPanel(); 
        panel.setBorder(BorderFactory.createTitledBorder("Create New Project"));
        layout = new GroupLayout(panel);
        panel.setLayout(layout);        
        layout.setAutoCreateGaps(true);
        layout.setAutoCreateContainerGaps(true);
        JLabel projectName = new JLabel("Name: ");
        JLabel projectDescription = new JLabel("Description: ");
        JLabel projectNote = new JLabel("Note: ");
        TextField nameTextfield = new TextField(10);
        TextArea descriptionTextarea = new TextArea(5,60);
        TextArea noteTextarea = new TextArea();
        JButton save = new JButton("Save");
        JButton cancel = new JButton("Cancel");
[COLOR="Blue"][B]        cancel.addActionListener(new ActionListener()
        {
           public void actionPerformed(ActionEvent e)
           {
               makeProjectPanel();
           }
        }); [/B][/COLOR]       
        layout.setHorizontalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addComponent(projectName)
                .addComponent(projectDescription)
                .addComponent(projectNote))
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)       
                .addComponent(nameTextfield)
                .addComponent(descriptionTextarea)
                .addComponent(noteTextarea)
            .addGroup(layout.createSequentialGroup()
                .addGap(150).addComponent(cancel)
                .addComponent(save))));
        
        layout.setVerticalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(projectName)
                .addComponent(nameTextfield))
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(projectDescription)
                .addComponent(descriptionTextarea))
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(projectNote)
                .addComponent(noteTextarea))
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(cancel)
                .addComponent(save)));
         
         projectPanel.add(panel);  
         pack();
    }
}
My problem is when I'm on the create new project panel and that I click on cancel, nothing happen. The actionlistener is no returning the makeProjectPanel method. Can anyone help me please. I'm new with actionlistener.