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

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

Question

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

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top