Creating Your Own Borders : Custom Border « Swing « Java Tutorial






  1. implements the Border interface
  2. extend the AbstractBorder class

AbstractBorder class is the better, since certain Swing classes has optimizations for the AbstractBorder-specific methods.









14.108.Custom Border
14.108.1.Creating Your Own Borders
14.108.2.implements Border interfaceimplements Border interface
14.108.3.Subclass AbstractBorderSubclass AbstractBorder
14.108.4.Creating a Compound Border
14.108.5.Creating and Setting a Raised BevelBorder from BorderFactory
14.108.6.Creating and Setting a Lowered BevelBorder from BorderFactory