import java.awt.*;import javax.swing.*;public class a {public static void main(String[] args) {new a();}public a() {JFrame JF = new JFrame("弹簧布局");JPanel JP = new JPanel(new SpringLayout());JLabel JL1=new JLabel("标题");JTextField JT1=new JTextField();JLabel JL2=new JLabel("作者");JTextField JT2=new JTextField();JLabel JL3=new JLabel("请输入内容");JTextArea JTA=new JTextArea(4,10);Container con = JF.getContentPane();JP.add(JL1);JP.add(JT1);JP.add(JL2);JP.add(JT2);JP.add(JL3);JP.add(JTA);con.add(JP);JF.setSize(600, 500);JF.setDefaultCloseOperation(3);JF.setLocationRelativeTo(null);JF.setResizable(false);JF.setVisible(true);}}