Why does secondary frames built using Net-beans GUI Builder not open to size built when made visible?

StackOverflow https://stackoverflow.com/questions/19119035

When Secondary Frames are added to a package and the frame is called using frame.setVisible(true); the frame shows but when it shows it is not open to the size it is built to but rather to the minimum size the frame can go and the user has to resize it, why is this?

Example image:

enter image description here

Here's a link to an SSCCE

有帮助吗?

解决方案

Be sure to pack() your frame and then call setVisible().

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top