Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Introducing BorderFactory

BorderFactory class offers a series of static methods for creating predefined borders. public class BorderFactory {   public static Border createBevelBorder(int type);   public static Border createBevelBorder(int type, Color highlight, Color shadow);   public static Border createBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner);   public static CompoundBorder createCompoundBorder();   public static CompoundBorder createCompoundBorder(Border outside, Border inside);   public static Border createEmptyBorder();   public static Border createEmptyBorder(int top, int left, int bottom, int right);   public static Border createEtchedBorder();   public static Border createEtchedBorder(Color highlight, Color shadow);   public static Border createEtchedBorder(int type);   public static Border createEtchedBorder(int type, Color highlight, Color shadow);   public static Border createLineBorder(Color color);   public static Border createLineBorder(Color color, int thickness);   public static Border createLoweredBevelBorder();   public static MatteBorder createMatteBorder(int top, int left, int bottom, int right, Color color);   public static MatteBorder createMatteBorder(int top, int left, int bottom, int right, Icon icon);   public static Border createRaisedBevelBorder();   public static TitledBorder createTitledBorder(Border border);   public static TitledBorder createTitledBorder(Border border, String title);   public static TitledBorder createTitledBorder(Border border, String title, int justification, int position);   public static TitledBorder createTitledBorder(Border border, String title, int justification, int position, Font font);   public static TitledBorder createTitledBorder(Border border, String title, int justification, int position, Font font, Color color);   public static TitledBorder createTitledBorder(String title); }