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){
}
答案 0 :(得分:3)
public int[] getSelectedIndices()
Returns an array of all of the selected indices, in increasing order.