List of utility methods to do Swing BorderLayout
void | makeLateralBorders(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 ... |
JPanel | wrapInBorderPanel(final JComponent component) Wraps a component in a JPanel with BorderLayout . final JPanel panel = new JPanel(new BorderLayout()); panel.add(component); return panel; |
JPanel | wrapWithBorder(JComponent aPanel, Border aBorder) wrap With Border JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(aPanel, BorderLayout.CENTER); wrapper.setBorder(aBorder); return wrapper; |