IvjEventHandler ivjEventHandler = new IvjEventHandler();
getJList1().addListSelectionListener(ivjEventHandler);
public void jList1_ListSelectionEvents() {
Object selectValue = getJList1().getSelectedValue()
return;
}
getJList1().addListSelectionListener(ivjEventHandler);
public void jList1_ListSelectionEvents() {
Object selectValue = getJList1().getSelectedValue()
return;
}
public void valueChanged(javax.swing.event.ListSelectionEvent e) {
if (e.getSource() == this.getJList1())
jList1_ListSelectionEvents();
};
}
不过,小弟还是不能理解,能不能在详细点
那个IvjEventHandler是什么
Jlist只能用swing下面的event?
new ListSelectionEvent()
{
public void valueChanged(javax.swing.event.ListSelectionEvent e)
{
System.out.println(mListTableName.getSelectedValue().toString());
} });小弟这段代码编译时候出现错误,帮我看看,谢谢
不是new ListSelectionEvent()