static int withBottomMargin_defaultWidth = 6; static JPanel withBottomMargin(Component c) { JPanel p = new JPanel(new BorderLayout); int w = withBottomMargin_defaultWidth; p.setBorder(BorderFactory.createEmptyBorder(0, 0, w, 0)); p.add(c); ret p; }