黑马程序员技术交流社区
标题:
List elements = dataBox.getSelectionModel().getAllSelectedElement(); 为空
[打印本页]
作者:
nuoxi0318
时间:
2013-7-25 18:31
标题:
List elements = dataBox.getSelectionModel().getAllSelectedElement(); 为空
if(i == 5) {
facemenuItem.setText("E 面");
facemenuItem.setName(i + "");
}
if(i == 6) {
facemenuItem.setText("F 面");
facemenuItem.setName(i + "");
}
menus[i - 1] = facemenuItem;
facemenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
List elements = dataBox.getSelectionModel().getAllSelectedElement();
if(elements.size() == 1) {
int currentFaceIndex = Integer.parseInt(((JMenuItem)e.getSource()).getName());
faceMenu.setCurrentFaceIndex(currentFaceIndex);
Element element = ((Element)elements.get(0));
element.putClientProperty(EquipmentAppletConstant.TAG_FACEINDEX, currentFaceIndex);
faceButton.setText(getLabelForFace(currentFaceIndex) + ":" + getLabelForFace(faceMenu.getFaceCount()) + " ");
EquipmentLocationUtil.changeVisibleByFace(element, currentFaceIndex);
}
}
});
}
复制代码
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2