开发者

Make a JPanel border with title like in Firefox

I would like to make an option dialog in my application. In this dialog I want to make kind of Areas surrounded with a border and with a title.

An example of what I want is in Firefox:

Make a JPanel border with title like in Firefox

开发者_StackOverflow中文版

How can I do something like that in Java?


Here you can find all informations you need.

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

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

You can also define your custom borders implementing Border interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜