Providing white space in a Swing GUI

Using various LayoutManagers one can provide spacing between various components. 1.) BorderLayout : Overloaded Constructor : BorderLayout(int horizontalGap, int verticalGap) Getter and setter methods For Horizontal Spacing : BorderLayout.getHgap() and BorderLayout.setHgap(int hgap) For Vertical Spacing : BorderLayout.getVgap() and BorderLayout.setVgap() 2.) FlowLayout : Overloaded Constructor : FlowLayout(int align, int hgap, int vgap) Getter and setter methods … Read more