I have the follwoing lines of code and am getting a NullPointerException in the second line because i is null. How will i call createImage so that i will have some value.
java.awt.Image i=this.createImage(800,1000); Graphics g= i.getGraphics(); //null pointer here
I am new to swing and now just started writing code for this class. Please help!