列表
-
下拉框
import javax.swing.*; import java.awt.*; public class TestComboboxDemo01 extends JFrame { public TestComboboxDemo01() { Container container = this.getContentPane(); JComboBox status = new JComboBox(); status.addItem(null); status.addItem("火热上映"); status.addItem("已下架"); status.addItem("即将上映"); container.add(status); this.setVisible(true); this.setSize(300,200); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new TestComboboxDemo01(); } }
import javax.swing.*; import java.awt.*; import java.util.Vector; public class TestComboboxDemo02 extends JFrame { public TestComboboxDemo02() { Container container = this.getContentPane(); //生成列表的内容 // String[] contents = {"1","2","3"}; Vector contents = new Vector(); //列表中需要放入内容 JList list = new JList(contents); contents.add("何金银"); contents.add("乌蝇哥"); contents.add("大师兄"); container.add(list); this.setVisible(true); this.setSize(300,200); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new TestComboboxDemo02(); } }
我的一生
第1章-废物的一生
第50章-糟糕的婴儿
第300章-莫欺少年穷
第600章-莫欺中年穷
第1000章-莫欺老年穷
第1100章-不详的离去
第1101章-棺材板的震动
第1150章-盗墓贼的眼泪
第1200章-死者为大

浙公网安备 33010602011771号