When I create a Canvas and a JFrame, then put the canvas onto the JFrame.
With this code
final Graphics g = Display.getBufferStrategy().getDrawGraphics();
g.setColor(Color.red);
g.fillRect(0, 0, 480, 360);
g.dispose();
Display.getBufferStrategy().show();
However when I put the code in
The drawing only occurs whenever its's in a loop.
This isn't a huge problem since it would be in a loop anyways, but it's annoying having to have it in a loop to have it draw/keep the image on the frame
Please someone help me.
Thanks.