private void useFrame() { frame = new Frame(); frame.setVisible(true); panel.setGraphics(frame.getGraphics()); }