为什么在jpanel中看不到我画的东西
import javax.swing.*; import java.awt.*;
public class KK
{
public static void main(String[] args)
{
JFrame jf=new JFrame();
JPanel jp=new JPanel();
Graphics g=jp.getGraphics();
int gWidth = jp.getWidth();
int gHeight = jp.getHeight();
jf.setContentPane(jp);
jf.setSize(500,500);
jf.show();
g.setColor(Color.RED);
g.fillOval(200, 100, 100, 40);
}
}