Quando executo meu código aparece o seguinte erro Exception in thread "main" java.lang.NullPointerException

package ui;

import javax.swing.*;

public class MainForm extends JFrame {
private JPanel rootPanel;
private JButton buttonNewContact;
private JButton buttonRemove;
private JTable tableContacts;

   public MainForm() {
          setContentPane(rootPanel);
          setSize(500,300);
          setVisible(true);

   }

   private void createUIComponents() {
          // TODO: place custom component creation code here


   }

}