主要程序是这样写的:
        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");