import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Border extends JFrame {
JButton north = new JButton("North");
JButton south = new JButton("South");
JButton
// Use default border
TitledBorder titledBorder = BorderFactory.createTitledBorder("Title");
// Create the title around existing border
titledBorder = BorderFactory.createTitledBo
There are several types of borders available, each represented by its own class. A border can be created using the class' constructor or using a border factory. The border factory is the typical metho
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Border extends JFrame {
JButton north = new JButton("North");
JButton south = new JButton("South");
JButton