展开全部
TitledBorder 类的文档62616964757a686964616fe58685e5aeb931333337396330讲了:
If the border, font, or color property values are not
specified in the constuctor or by invoking the appropriate
set methods, the property values will be defined by the current
look and feel, using the following property names in the
Defaults Table:
"TitledBorder.border"
"TitledBorder.font"
"TitledBorder.titleColor"UIDefaults defaults=UIManager.getLookAndFeelDefaults();
String key = "TitledBorder.font";
Font font = defaults.getFont(key).deriveFont(18.0f);
UIManager.put(key,new javax.swing.plaf.FontUIResource(font));