sorry for posting in wrong section, but its urgent and I think more people are involved into this section that's why im posting.
while developing one strategy game , in the later rounds I get null pointer exception in the layermanager.paint method.
below is the code
even if I create new objects of graphics and layer manager in case if they are null. I am getting null pointer in paint method. what can be the reasonCode:if(g==null){ System.out.println("new graphics"); g=getGraphics(); } if(layerManager==null){ System.out.println("new layer manager"); layerManager=new LayerManager(); } layerManager.paint(g, 0, 0);
can somebody give some suggestions.

Reply With Quote

