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

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

    Code hanging program

    Oracle Community | 9 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