swing加载图片

Graphics g = mf.getGraphics();
Image img = new ImageIcon("book1.png").getImage();
g.drawImage(img, 2, 2, null);

 

posted @ 2018-01-11 07:54  yoyo198212  阅读(220)  评论(0编辑  收藏  举报