public void paint(Graphics g) {
Integer width=800,height=800;
BufferedImage buffImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
g = buffImg.createGraphics();
// 将图像填充为白色
g.setColor(Color.WHITE);
g.fillRect(0, 0, width, height);
// 画边框。
g.setColor(Color.red);
g.drawRect(0, 0, width - 1, height - 1);
g.setColor(Color.red);
g.drawString("画图sd类", 200, 180);
//直接输出到浏览器,这两句是必须设置的
}
如何给这个方法传参来调用它使得可以在网页中画出来