【无标题】
作者:互联网
//3.创建5个组件(按钮组件)
JButton btn_1 = new JButton(“PAGE_START”); JButton btn 2 = new JButton(“PAGE_END”); JButton btn_3 = new JButton(“LINE_START”); JButton btn_4 = new JButton(“LINE_END”); JButton btn 5 = new JButton(“CENTER”); //4、将组件添加到容器当中jf.add(btn_1,BorderLayout. PAGE_START); jf.add(btn_2, BorderLayout. PAGE_START); jf.add(btn_3,BorderLayout.PAGE_START); jf.add(btn_4,BorderLayout. PAGE_START); jf.add(btn_5,BorderLayout.PAGE_START);
标签:BorderLayout,无标题,PAGE,START,jf,btn,JButton 来源: https://blog.csdn.net/Neo8464/article/details/122275971