Java Swing

JComponent supports drawing specialized borders around itself. This can be done using the setBorder(Border border) method. The javax.swing.border package provides classes to create several types of Border. To create these borders it is advisable to always use the javax.swing.BorderFactory class. This is a factory pattern implementation for creating swing borders.