JDialog绘制图形的有关问题
JDialog绘制图形的问题
我不重写paint方法,在其他方法里面使用
Graphics g = getGraphics();
g.setColor(Color.BLUE);
g.fillRect(0, 0, width, height);
为什么就显示不出来,因为需要所以不能用paint,求解决方法
------解决方案--------------------
我不重写paint方法,在其他方法里面使用
Graphics g = getGraphics();
g.setColor(Color.BLUE);
g.fillRect(0, 0, width, height);
为什么就显示不出来,因为需要所以不能用paint,求解决方法
------解决方案--------------------