主要程序是这样写的:
ArrayList al=new ArrayList();
al.add(cb1);
al.add(cb2);
al.add(cb3); Vector v=new Vector(al); JList jList=new JList(v); jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jList.setFixedCellHeight(50);
jList.setFixedCellWidth(150); JScrollPane scrollPane=new JScrollPane(jList);
panCenter.add(scrollPane,gbc); getContentPane().add(panCenter, "North");
ArrayList al=new ArrayList();
al.add(cb1);
al.add(cb2);
al.add(cb3); Vector v=new Vector(al); JList jList=new JList(v); jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jList.setFixedCellHeight(50);
jList.setFixedCellWidth(150); JScrollPane scrollPane=new JScrollPane(jList);
panCenter.add(scrollPane,gbc); getContentPane().add(panCenter, "North");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货