我使用的是Jide 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");
}
});发布于 2012-02-01 05:59:54
我在老版本(2.10.*)中使用这种方法很好。但是看一下3.1.1的仓库,它就在source中。
另外,你在问题中把它拼错了。我希望你是在找getCheckBoxListSelectionModel()
https://stackoverflow.com/questions/9087314
复制相似问题