Why does this not work? It shows me the GUI but not the paint. How would I change this into two classes?
import java.awt.Graphics;
import javax.swing.JFrame;
public class runpaintgui extends JFrame{
public static void main(String[] args){
JFrame frame = new JFrame();
frame.setSize(5000,2000);
frame.setResizable(false);
frame.setTitle("game");
frame.setVisible(true);
}
public void paint(Graphics g){
super.paint(g);
g.drawString("adsf",40,45);
g.draw3DRect(50, 30, 600, 700, true);
repaint();
}
}