I have a JFrame containing a JPanel. The JPanel has GroupLayout and a
CustomLayoutStyle class. It contains several components laid out vertically.
At runtime I delete one of the components. After the component is deleted
how can I can get the CustomLayoutStyle getPreferredGap() method automatically
called so that the GUI is refreshed and the vertical gap where the deleted
component was is set to the preferred gap size as returned by getPreferredGap().
I have tried:
but the method getPreferredGap() does not get called.