codice:
import javax.swing.*;
import java.awt.*;
public class FrameExampleLayout extends JFrame {

   public FrameExampleLayout() {
      setLayout(new BorderLayout());
      ...
      ... 
      ...
      add(new PannelloGrid(), "Center");
      ....
      ....
      setVisible(true);
   }
}

public class PannelloGrid extends JPanel {

   public PannelloGrid() {
      setLayout(new GridLayout());
      ...
      ...
      ...
      ...
      add(new JLabel(""));
      add(new JButton(""));
      ....
      ....
   }
}
Il codice presentato mi permette di creare un oggetto di tipo PannelloGrid e di aggiungerlo al centro di un frame con borderLayout.
Come posso rimuovere ciò che aggiungo tramite l'add nella classe FrameExampleLayout?