请问下大佬们为什么我这个代码运行之后除了个框什么都没有?
package com.Swing_Domo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
//用面板
public class practise extends JFrame{
//创建下拉列表
JComboBox<String> jc=new JComboBox<>(new MyComboBox());
JButton b1=new JButton("确定");
JButton b2=new JButton("取消");
//设置复选框组件
JCheckBox jc1=new JCheckBox("男",true);
JCheckBox jc2=new JCheckBox("女",true);
JCheckBox jc3=new JCheckBox("不男不女???",true);
public practise() {
Container c=getContentPane();
setTitle("皮一下窗体");
setSize(300,300);
setVisible(true);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
c.setBounds(0,0,100,100);
b1.setBounds(280,110,30,10);
b2.setBounds(280, 190, 30, 10);
jc1.setBounds(120,150,10,10);
jc2.setBounds(150,150,10,250);
jc3.setBounds(180,150,10,20);
c.add(b1);
c.add(b2);
c.add(jc1);
c.add(jc2);
c.add(jc3);
//设置事件监听器
b1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
});
//设置监听器
b2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
});
jc1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
jc2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
jc3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new practise();
}
}
class MyComboBox extends AbstractListModel <String>implements
ComboBoxModel<String>{
String selectedItem=null;
String[] test= {"田螺菇凉","巴扎黑","小明"};
public String getElementAt(int index) {//返回索引处的值
return test[index];
}
public int getSize() {//返回数组的长度
return test.length;
}
public void setSelectedItem(Object item) {//设置下拉列表框项目
selectedItem=(String)item;
}
public Object getSelectedItem() {//获取下拉列表项目
return selectedItem;
}
}