Make JPanel border with title like in Firefox

I would like to make a selection dialog in my application. In this dialog, I want to make the appearance of areas surrounded by a border and with a name.

An example of what I want is in Firefox:

Firefox options

How can I do something like this in Java?

+7
source share
1 answer

Here you can find all the necessary information.

Basically, you can use a border factory to create a border using the types available in Swing:

Border lineBorder = BorderFactory.createLineBorder(Color.black); JPanel panel = new JPanel(); panel.setBorder(lineBorder); 

You can also define your user boundaries by implementing the border interface .

+10
source

All Articles