java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

Coderanch | Jacky Luk | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Binding a JComboBox to a JTable

    Coderanch | 5 years ago | Jacky Luk
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to java.lang.Integer

      at edica.JEDICA_Frame$1.actionPerformed()
    2. edica
      JEDICA_Frame$1.actionPerformed
      1. edica.JEDICA_Frame$1.actionPerformed(JEDICA_Frame.java:82)
      1 frame
    3. Java RT
      JComboBox.addItem
      1. javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
      2. javax.swing.JComboBox.contentsChanged(JComboBox.java:1331)
      3. javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118)
      4. javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:94)
      5. javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:132)
      6. javax.swing.JComboBox.addItem(JComboBox.java:718)
      6 frames
    4. edica
      CMain.main
      1. edica.CMainController.fill_PIN_combo_box(CMainController.java:39)
      2. edica.CMainController.<init>(CMainController.java:23)
      3. edica.CMain.main(CMain.java:20)
      3 frames