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

Coderanch | Jacky Luk | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Binding a JComboBox to a JTable

    Coderanch | 4 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