Java Utililty Methods Swing BorderLayout

List of utility methods to do Swing BorderLayout

Description

The list of methods to do Swing BorderLayout are organized into topic(s).

Method

voidmakeLateralBorders(JPanel panel, Dimension reference, Border style)
make Lateral Borders
JLabel placeHolder = new JLabel("");
placeHolder.setBorder(style);
placeHolder
        .setPreferredSize(new Dimension((int) (reference.getWidth() / 16), (int) (reference.getHeight())));
panel.add(placeHolder, BorderLayout.WEST);
placeHolder = new JLabel("");
placeHolder.setBorder(style);
placeHolder
...
JPanelwrapInBorderPanel(final JComponent component)
Wraps a component in a JPanel with BorderLayout .
final JPanel panel = new JPanel(new BorderLayout());
panel.add(component);
return panel;
JPanelwrapWithBorder(JComponent aPanel, Border aBorder)
wrap With Border
JPanel wrapper = new JPanel(new BorderLayout());
wrapper.add(aPanel, BorderLayout.CENTER);
wrapper.setBorder(aBorder);
return wrapper;