1 Reply Latest reply: Jul 16, 2013 3:17 PM by morgalr RSS

    Free form layout


      Does anyone know how to remove a component at runtime from a JPanel which has GroupLayout

      as its LayoutManager AND maintain the preferred gaps between the components in the JPanel.

        • 1. Re: Free form layout

          You need to replace the Component with something... either another JPanel with the perferred size set or another Component, I usually use a JPanel to leave blank space.  It works as long as your layout manager honors the perferred size.