如何在 JLabel 中调整图像/图标图像的大小?
这是我的代码:
String s = "/Applications/Asphalt6.app";
JFileChooser chooser = new JFileChooser();
File file = new File(s);
Icon icon = chooser.getIcon(file);
// show the icon
JLabel ficon = new JLabel(s, icon, SwingConstants.LEFT);
现在,从图标中提取的图像非常小。我怎样才能调整它的大小?
Here's my code:
String s = "/Applications/Asphalt6.app";
JFileChooser chooser = new JFileChooser();
File file = new File(s);
Icon icon = chooser.getIcon(file);
// show the icon
JLabel ficon = new JLabel(s, icon, SwingConstants.LEFT);
Now, the image extracted from the icon is really small. How can I resize it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)