MultiRowFlowPanel (@NotNull MultiRowFlowPanel panel) { if (panel.getComponentCount() <= 0) { return panel; } add(panel, new GridBag().anchor(GridBagConstraints.WEST).weightx(1).fillCellHorizontally().coverLine()); myRows.add(panel); return new MultiRowFlowPanel( FlowLayout.LEFT, ArrangementConstants.HORIZONTAL_GAP, ArrangementConstants.VERTICAL_GAP ); }