请问一下各位高手,为什么下面的程序编译能通过,但是运行就会出错呢???谢谢了!!!
import javax.swing.*;
import java.awt.*;public class ExecBorderLayout extends JPanel
{
public ExecBorderLayout()
{
JButton jbt1 = new JButton("Button1");
JButton jbt2 = new JButton("Button2");
JButton jbt3 = new JButton("Button3");
add(jbt1);
add(jbt2);
add(jbt3);
                  setLayout(new BorderLayout(5,5));
} public static void main(String[] args)
{
ExecFlowLayout p1 = new ExecFlowLayout();
ExecFlowLayout p2 = new ExecFlowLayout();
JFrame frame = new JFrame();
frame.add(p1);
frame.add(p2);
frame.setSize(600,80);
frame.setLocationRelativeTo(null);
frame.setTitle("练习");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}