Most layouts respect the component preferred size. See Laying Out Components