I have some components on a panel and then add this panel to a container and then have my frame displayed as the result of an ActionListener on a button. Why is it that my frame is displayed but is miniscule and looks minimised, only showing the title bar?
This is really annoying. setVisible is set to true and when I expand the frame all my components appear but it will not appear correctly from the oiutset. This has to be something simple I'm missing. Any help much appreciated, thanks.
....all I see is the start of the dialog title 'Add New..'
Joined: Feb 23, 2007
It's only doing what you tell it to.
Myself, I'd try to use a combination of layouts, and then let the individual layout managers set the best size to display their contents. I'd also call pack on the window before displaying. e.g.,
Joined: Apr 04, 2009
That's it....I never even thought that my preferred size was the issue here ....