MainSheath() {
super("BankProgramm v1.0");
d = new Dimension(100, 100);
jp = new JPanel();
jb1 = new JButton("User");
jb1.setSize(50, 50);
jb2 = new JButton("Admin");
jb2.setSize(50, 50);
jb3 = new JButton("Info");
jb3.setSize(50, 50);
jp.setLayout(new GridLayout(3, 1));
jp.add(jb1);
jp.add(jb2);
jp.add(jb3);
jp.setSize(d);
this.setContentPane(jp);
this.setVisible(true);
this.setSize(300, 300);
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
this.setResizable(false);
}
public static void main(String[] args) {
new MainSheath();
}

而是
jp.setLayout(new GridLayout(3, 1));添加GridLayout默认拉伸组件。