I wrote a simple program in JAVA having 4 classes:
Main - > CarFaxApp
GUI / Logic - > CarFaxFrame
Object -> Car
Validator -> CarFaxValidator
Once the program is running and I start to enter the necessary data in the textbox's for the car (String vin, String make, String model, int year)
. Everything works fine, but when I hit buttonADD(), I get a error.
private HashMap<String,Car>hmCar; //Hashmap to hold Cars, the key pair value consists of (Vin, Car Object)
The error happens on hmCar.put(car.getVin(), car);
which I dont understand why, I tried debugging up to the point and car does hold the correct values.
Here a screen shot of the error: