I have created a simple JFrame with two labels, two fields and two buttons. ContentPane with BoxLayout has a JPanel. JPanel with MigLayout have all the 6 components. Components are placed relatively and growable, but I am forced to give bounds to JFrame, which I would like to avoid. If I avoid setBounds(). Frame appears very small and it shows only window buttons. If I mention some size to JFrame, it can accomodate components well in Windows not in Mac(Buttons at bottom are truncated a little). Specifying greater frame size spares look and feel in Windows.
Is it possible to make a JFrame growing automatically with respect to its child components? or to make it accomodate everything dynamically without setting bounds?
Call
pack().