Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove gap to Parent Containers Border in Miglayout

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...

like image 453
Dominik Obermaier Avatar asked May 13 '11 14:05

Dominik Obermaier


1 Answers

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

"fill, debug, insets 0"
like image 152
meverett Avatar answered Oct 27 '22 10:10

meverett