Resize image with JFrame window resize in java

戏子无情 提交于 2019-12-25 18:57:15

问题


I have 10 images in one JPanel in JFrame. I want to resize all these images when user resize the JFrame window.


回答1:


  1. Use a GridLayout to display the images. The grid will resize as the frame is resized.

  2. Use Darryl's Stretch Icon to display the Icon on a JLabel. The Icon will automatically resize itself.



来源:https://stackoverflow.com/questions/28541974/resize-image-with-jframe-window-resize-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!