1
这里是我的代码在jlable如何jlable在java中显示完整的图像
FileDialog fd=new FileDialog(this);
fd.show();
picturepath=fd.getDirectory()+fd.getFile();
jLabelPictureAdd.setIcon(new ImageIcon(picturepath));
jLabelPictureAdd.setHorizontalAlignment(jLabelPictureAdd.CENTER);
diplays only part of the image
显示完整的图像,但它这么想的显示图像的完整图像,但部分请有人帮我解决这个问题。谢谢
的[调整画面,以适应一个JLabel]可能的复制(http://stackoverflow.com/questions/16343098/resize-a-picture-to-fit-a-jlabel) – TimeToCode
尺寸也许对于JLabel来说太大了...所以它要么调整标签或图像的大小。 –