Fit all components from JFrame to actual size of window

佐手、 提交于 2019-12-12 05:08:23

问题


I'm using NetBeans. How I can make all components from my window to resize to actual size of the window? Now when my window is 800x600 and I make it larger, size of all components are the same. I would like to change size of my components when I change size of open application window.

I tried to search for answer on the internet but I couldn't find good answer to my problem.


回答1:


I tried to search for answer on the internet but I couldn't find good answer to my problem.

I find that hard to believe.

Almost every other question in the forums is about laying out components. The standard answer is to use a Layout Manager. Read the section from the Swing tutorial on Using Layout Managers for more information. We can't give specific information because we have no idea what your GUI looks like.



来源:https://stackoverflow.com/questions/15868553/fit-all-components-from-jframe-to-actual-size-of-window

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