RightPanel rp = new RightPanel(new GridBagLayout());
The code above will not work because you don't have any parameter in your constructor..
public class RightPanel extends JPanel
//codes...
public RightPanel() //You don't have any parameter in your constructor
If you are trying to set the Layout of your class use
setLayout(new GridBagLayout())