复选按钮
作者:互联网
package cn.rushangw.lesson05;
import javax.swing.*;
import java.awt.*;
public class JButtonDemo03 extends JFrame {
public JButtonDemo03() {
Container container = getContentPane();
//多选按钮
JCheckBox checkBox01 = new JCheckBox("checkBox01");
JCheckBox checkBox02 = new JCheckBox("checkBox02");
container.add(checkBox01,BorderLayout.SOUTH);
container.add(checkBox02,BorderLayout.NORTH);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setVisible(true);
setBounds(1,1,500,500);
}
public static void main(String[] args) {
new JButtonDemo03();
}
}
标签:JCheckBox,container,checkBox01,checkBox02,复选,按钮,new,JButtonDemo03 来源: https://www.cnblogs.com/nigustudent/p/14814752.html