简体   繁体   中英

Fit all components from JFrame to actual size of window

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM