我使用的是积德OSS 3.1.1
在使用CheckBoxList时,我发现它缺少getCheckBoxListSectionModel?它在文档中,但点运算符没有透露这样的事情。我想知道这个是否只有付费版本可用?
有 getSelectionModel()
但是使用它不会触发选定的事件。
Object[] options = {"This Element","Similar Elements"};
CheckBoxListWithSelectable checkboxlist = new CheckBoxListWithSelectable(options);
int result = JOptionPane.showConfirmDialog(rootPane, checkboxlist,
"Please Select Action(s) For This Element", JOptionPane.OK_CANCEL_OPTION);
checkboxlist.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
// TODO Auto-generated method stub
System.out.println("selected");
}
});
最佳答案
我在旧版本(2.10.*)中使用这个方法很好。但是查看 3.1.1 的仓库,它位于 source 中。 。
此外,您的问题中拼写错误。我希望您正在寻找getCheckBoxListSelectionModel
() .
关于java - jide oss 3.1.1,缺少checkboxlistselectionmodel?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9087314/