JFrame resize according to content
843806Aug 14 2009 — edited Aug 15 2009Hi,
My program generates JFrame components with one column of JPanels each containing one JLabel filling its panel. The generation of the components themselves is not the problem, rather the resizing of the JFrame according to the components' sizes. At the moment my settings for the preferred size of the JFrame cuts of most of the components lower down the column. If I'd use other sizes they may be too narrow / too wide for the text in the labels of the panels.
Is there a way to set the JFrame size according to the content?
My requirements would be:
Width -> All labels may not have broken lines
Height -> All panels in the column must be completely visible
I'd appreciate any help, thanks
Tim
Edited by: Geotim90 on Aug 14, 2009 1:47 PM