I'm new to programming and I can't seem to sort this problem: how can I make the frame of my app change? It's a Minesweeper game. The program logic is good, events are working, but the frame itself isn't repainting itself... I did not have this kind of problem with applets.. how can I make this work?
public void paint(Graphics g) {
Graphics2D g2=(Graphics2D)g;
_Main.toPaint(g2);
}
public void update(Graphics g) {
Graphics offgc;
Image offScreen=null;
Dimension d=size();
offScreen=createImage(d.height, d.width);
offgc=offScreen.getGraphics();
offgc.setColor(getBackground());
offgc.fillRect(0, 0, d.width, d.height);
offgc.setColor(getForeground());
paint(offgc);
g.drawImage(offScreen,0,0,this);
}