java图片背景复选框Demo,主要代码 Image srcImg = ImageIO.read(new File("images/imagecb/cb_unselect.png")); BufferedImage bufImg = new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB_PRE); Graphics2D g2d = bufImg.createGraphics(); g2d.drawImage(srcImg, 0, 0, 20, 20, null);