Errors occur in this line:
G.d rawImage (new ImageIcon (getClass () getResource (image \ \ "" +" chessboard. JPG ")). The getImage (), 90, 60, 625, 700, this);
The console display:
The Exception in the thread "is the AWT - EventQueue - 0" Java. Lang. NullPointerException
The at Java desktop/javax.mail. Swing. ImageIcon. & lt; init> (ImageIcon. Java: 217)
The at DrawUI. Paint (DrawUI. Java: 31)
CodePudding user response:
Null pointer to a breakpoint, where is your which one object is empty, when empty calls a method will report this problem, it's look not to come outCodePudding user response:
Null pointer exception is refers to the object instantiated, can't call the instance variables and methods, as long as see calls the method or variable object, there is ". "where did object instantiated,CodePudding user response: