要做咖啡机界面,我的代码怎么实现在主函数里接收右面板

这是右面板:
public class RightPanel extends JPanel{
JPanel p1 = new JPanel();
JPanel p2 = new JPanel();
static JPanel p3 = new JPanel();
JButton b1,b2,b3,b4,b5,b6,b7;
static JPanel rp=null;
private RightPanel(){
this.setLayout(new FlowLayout());
p1.add(b1=new JButton("加水"));
p1.add(b2=new JButton("加粉"));
p1.add(b3=new JButton("加糖"));
p1.add(b4=new JButton("加杯"));
p2.add(b5=new JButton("投币"));
p2.add(b6=new JButton("退币"));
p2.add(b7=new JButton("取出"));
p3.add(p1);
p3.add(p2);
}
public static JPanel getInstance(){
rp=p3;
return rp;
}
}
这是主函数:
public class CoffeeATM {

public static void main(String[] args) {
    ATMFrame f = new ATMFrame();
    f.setVisible(true);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

}
class ATMFrame extends JFrame{
JPanel rp ;
ATMFrame(){
this.setSize(300,600);
rp=RightPanel.getInstance();
Container c= this.getContentPane();
c.add(rp,BorderLayout.EAST);
}
}
新手,求解答,我的一直是空白页,哪里错了?

想写单例模式,就好好看看写的对错

    public static JPanel getInstance(){
        rp=p3;
        return rp;
    }

私有的构造方法没有调用阿,同志。
它能显示吗?