怎么样在页面上显示图片
乃刀的青春 2013-01-17 11:30:42 SlideShow ppt1 = new SlideShow(new HSLFSlideShow("G:\\cd.ppt"));
Dimension pgsize = ppt1.getPageSize();
Slide[] slide = ppt1.getSlides();
for (int i = 0; i < slide.length; i++) {
BufferedImage img = new BufferedImage(pgsize.width, pgsize.height , BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = img.createGraphics();
//clear the drawing area
graphics.setPaint(Color.white);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height));
//render
slide[i].draw(graphics);
FileOutputStream out = new FileOutputStream("slide-" + (i+1) + ".png");
javax.imageio.ImageIO.write(img, "png", out);
out.close();
System.out.println(ppt1.getPageSize());
}
这个把ppt转成了一张图片,如何让这个图片显示在页面上,