//测试 自动缩放
this.headPicLab = new JLabel();
ImageIcon im = new ImageIcon(stu.getHeadPic());
im.setImage(im.getImage().getScaledInstance(73, 106, Image.SCALE_DEFAULT));
this.headPicLab.setIcon(im);
this.headPicLab.setBounds(300, 40, 73, 106);
this.add(this.headPicLab);
JavaGUI的图片自动缩放实现
最新推荐文章于 2023-03-17 13:47:41 发布