This is an extremely simple question, but I have no idea what to do.
package typeandscreen;
imports
public class DisplayWindow {
Font f = new Font();
void run(){
try {
Display.setDisplayMode(new DisplayMode(1000,560));
Display.setTitle("Test for Bitmaps / Letters");
Display.create();
} catch(LWJGLException e) {
e.printStackTrace();
System.exit(0);
}
while(!Display.isCloseRequested()){
Graphics g;
What do I make Graphics g equal? I just want to draw the subImage f.letters[0] onto the screen, but I don't know what I'm supposed to put there.
Making the lower line Graphics.drawImage(etc) doesn't work, and leaving it how it is, is a null pointer exception. If I do "Graphics g = f.letters[0].getGraphics()" for the above line then it's also a null pointer exception.
g.drawImage(f.letters[0],0,0,null);
Display.update();
}
Display.destroy();
}
public static void main(String args[]){
DisplayWindow dw = new DisplayWindow();
dw.run();
}
}