JLabel の周りに境界線を作成する方法を探しています。しかし、私はそれを無色にしたくありません。前もって感謝します。
public TitlePanel()
{
    title = new JLabel("This is some text!", JLabel.CENTER);
    add(title);
    //This will make a black border around the "title" label
    title.setBorder(new LineBorder(new Color(0,0,0)));
}