Remove gap to Parent Containers Border in Miglayout
-
13-11-2019 - |
Question
first a picture for visualizing the 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...
Solution
It's been a little while since I touched MigLayout but try:
"fill, debug, insets 0"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow