This discussion is archived
1 Reply Latest reply: Jul 16, 2013 1:17 PM by morgalr RSS

Free form layout

mendescholl Newbie
Currently Being Moderated

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
    morgalr Explorer
    Currently Being Moderated

    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.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points