JComboBox setSelectedItem不起作用

时间:2016-05-16 16:20:09

标签: java

你好我在点击jtable时遇到问题,然后jcomboSelection没有设置,所有其他字段都被设置了。

 private void jTableClassTableKeyReleased(java.awt.event.KeyEvent evt) {                                             
        int row = jTableClassTable.getSelectedRow();
        if(row < 0){

            JOptionPane.showMessageDialog(null,"Please Select Row from Table");

        }//end if
     else{
            int eid = (int) jTableClassTable.getValueAt(row, 0);
                        jComboBox1.setSelectedItem(bean.getClassName());
ClassesBean bean = bal.getClassDetail(eid);
            jDateChooserStartingDate.setDate(bean.getStartingYear());

        }//end Table Click
    }                

0 个答案:

没有答案