How to add a title to a border?
This example show you how to create a border that have a title in it. There is a special border class the
TitledBorder that does this. We can define the justification of the title, for example on the left, centered or right justify. To do this we call the
setTitleJustification() method. We can also set other attribute such as font or the title position.