| Author |
Why does this component appear shrunken ?
|
Colm Dickson
Ranch Hand
Joined: Apr 04, 2009
Posts: 84
|
|
Hi all.
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..'
Thanks.
Colm
|
 |
pete stein
Bartender
Joined: Feb 23, 2007
Posts: 1561
|
|
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.,
|
 |
Colm Dickson
Ranch Hand
Joined: Apr 04, 2009
Posts: 84
|
|
Thanks Pete,
That's it....I never even thought that my preferred size was the issue here ....
Cheers,
Colm
|
 |
 |
|
|
subject: Why does this component appear shrunken ?
|
|
|