Now, my latest problem:
I'm using a BufferStrategy in Java to draw directly on a JFrame. The Frame displays and I can draw shapes on it. However, any call to g.drawImage(); (g being a Graphics object) doesn't do anything. I'm not sure what's happening. The code seems to be getting passed over, because I've put print statements before and after it and they both get printed.
Here's the important snippets of code:
This code actually calls the other objects Draw Functions
private void drawImage(){
BufferStrategy bf = this.getBufferStrategy();
Graphics g = null;
try{
g = bf.getDrawGraphics();
//Pass off Graphics to each object so it can draw itself
mmenu.drawMenu(g);
}finally{
g.dispose();
}
bf.show();
Toolkit.getDefaultToolkit().sync();
}
And this is the draw method of the menu object (mmenu) and it's constructor
private Image bg;
public MainMenu(String bg){
this.bg = Toolkit.getDefaultToolkit().getImage(bg);
}
public void drawMenu(Graphics g){
g.drawImage(bg,100,100,null);
}






