Strange NullPointerException at buffImage.getGraphics()
posted 13 years ago
Im getting a NullPointerException at a method that is well known and used when displaying graphics. Im doing like discribed in most books... Im really depressed. this is the part of the faulty code (common Double-Buffering in JApplet) Graphics buffGraphics; Image buffImage; in init(): buffImage = createImage(500,500); buffGraphics = buffImage.getGraphics(); <- halt is here the rest is also like described in books, update(Graphics g) is overwrited and so on... why am i getting a nullpointerexception in the init method??? what could be the problem?