Hi, I can't search bookings in my carrental program. I get:
"Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException"
the line that needs to be corrected is:
(first line is working)
textFieldDate.setText(controller.findBooking(textF ieldBookingNo.getText()).getDate());
textFieldCustomerNo.setText(controller.findBooking (textFieldBookingNo.getText()).getCustomer().getCu stomerNo());
textFieldRegNo.setText(controller.findBooking(text FieldBookingNo.getText()).getVehicle().getRegNo()) ;
When I try to get the date, CustomerNo and the Vehicle, only the date works. The only diffenence between the lines is that the first one is getting the Strings from the class "Booking" and the two other lines get the Strings from 2 classes.("Vehicle" and "Customer")