Remove the gap between parent containers in Miglayout

first image to visualize the problem Gap Removal Problem

As you can see, there is a huge gap for the parents container on the right and left side of the panel with arrows, which should not be. I have no idea how to remove a space. I have been struggling with this for several hours, I tried almost everything in the documentation and read all the relevant topics of the SO forum and MiG Support Forum. Here is the relevant code:

public class ArrowPanel extends JPanel
{

 public ArrowPanel()
 {
     setLayout( new MigLayout( "fill,debug" ) );

     add( new JLabel( Icons.roundArrowRight() ), "grow,wrap" );
     add( new JLabel( Icons.roundArrowLeft() ), "grow" );
 }
}

I think it should be easy, but somehow I don’t understand ...

+5
source share
1 answer

It's been a while since I touched MigLayout, but try:

"fill, debug, insets 0"
+17

All Articles