请问Canvas作为方法参数怎么画图呢?
public void doCanvas(Canvas _Canvas){
这边怎样用 paint(Graphics g)
}
昵称: life923 时间: 2011-09-06 18:11:21
public void paintComponent(Graphics g)
{
Graphics2D g2 = (Graphics2D)g;
super.paintComponent(g);
Image img = Toolkit.getDefaultToolkit().getImage("d:\\a.jpg");
g2.drawImage(img, 0, 0, this.getWidth(), this.getHeight(), this);
}
昵称: xwguan 时间: 2011-09-06 18:44:06