BufferedImage bim=new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
bim= ImageIO.read(new URL("001.bmp"));
Graphics g=bim.getGraphics();
g.drawImage(bim, 0, 0, null);
或者
ImageIcon p=new ImageIcon(this.getClass()
.getResource("title.png"));
int i=p.getIconHeight();
int j=p.getIconWidth();
p.setDescription("");
具体里面的方法去api 看看 有画笔和设置尺寸的,获取尺寸的
我觉得应该声明一个Graphics2D对象,然后用getGraphics()来实例化。再转换成Graphics2D类的
Graphics2D g = (Graphics2D) getGraphics();
bim.getGraphices()呗