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

Oracle Community | annihilate | 10 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

    Code hanging program

    Oracle Community | 10 years ago | annihilate
    java.lang.ClassCastException: java.lang.String cannot be cast to Unit

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to Unit

      at NewStudentGUI.addStudent_buttonActionPerformed()
    2. Unknown
      NewStudentGUI$3.actionPerformed
      1. NewStudentGUI.addStudent_buttonActionPerformed(NewStudentGUI.java:227)
      2. NewStudentGUI.access$200(NewStudentGUI.java:11)
      3. NewStudentGUI$3.actionPerformed(NewStudentGUI.java:98)
      3 frames
    3. Java RT
      BasicButtonListener.mouseReleased
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      2. javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      3. javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      4. javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      5. javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
      5 frames