everyone. I have recently started Java programming.
I am trying to make a school management system. In there, I received some error while entering marks in the report card section. I am not sure where I went wrong as the program compiles successfully. However, while clicking on save button, I am getting this error:
java.lang.NullPointerException: Cannot invoke "String.toString()" because the return value of "javax.swing.JTextField.getSelectedText()" is null
Here is what I have tried:
And Here is my MYSQL database:
I will be really grateful for help/tip you can give me. Thank you!!