if("Back".equals(e.getActionCommand()))
{
escape.setVisible(false);
paused = false;
running = !running;
Graphics g = start.getGraphics();
g.dispose();
Component glassPane = start.getGlassPane();
glassPane.setVisible(!glassPane.isVisible());
Main.main(null);
Main.running = true;
start.dispose();
}
This is my code for disabling my jframe, loading a new one, and disposing it. Whenever I do this, when I return to the frame I get strange graphical errors.
How do I close the frame completly?