6

first a picture for visualizing the problem Gap Removal Problem

As you can see, there is a huge gap to the parents container on the right and left side of the panel with the arrows, which should not be there. I do not have a clue how to remove the gap. I'm struggling with this for hours, I tried almost everything in the documentation and read all relevant topics on SO 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 this should be easy, but somehow I do not get it...

Dominik Obermaier
  • 5,610
  • 4
  • 34
  • 45

1 Answers1

19

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

"fill, debug, insets 0"
om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
meverett
  • 921
  • 5
  • 6