用Graphics画图问题
class Qipan extends JFrame
{
Qipan(int x,int y)
{
setTitle("五子棋棋盘");
setSize (x,y);
setVisible(true);
setLocation(400,160);
//Graphics g=this.CreateGraphics();
g.drawLine(10,11,10,11);
g.setColor(Color.black);
g.setColor(Color.blue);
}
//Graphics g=this.CreateGraphics();
为什么不能用呢?应该怎么改呀,谢谢各位了。