-1
    try{
    f = new ProjectFile();

    numProject = f.getOutput();

    String[] projectData = new String[numProject.length];

//从另一个文件中检索数据并将标题存储到projectData

        for (int i = 0; i < projectData.length; i++) {
            projectData[i] = numProject[i].getProjectTitle();
        }

        listProject.setListData(projectData);
        System.out.println(listProject.getSelectedIndex());
}catch(Exception e){
}
4

1 回答 1

3

使用getSelectedIndices()方法

public int[] getSelectedIndices()

Returns an array of all of the selected indices, in increasing order. 
于 2012-07-14T07:21:46.717 回答