Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Default label font for Nimbus LAF

843806Oct 23 2008 — edited Aug 6 2009
Hi all.

In my Java application, I am setting UIManager properties in order to set the default font for several UI components, through calls like this:

[...]
UIManager.put("Label.font", myDefaultFont);
[...]

This approach works with Metal Look & Feel: all JLabels that I create after the above call are automatically set to the "myDefaultFont" Font.

Nevertheless, this approach does NOT work with the new Nimbus LAF (used of course with JRE 1.6.0_10).
Do you know how to set the default font for the UI components when using Nimbus?

Any help would be greatly appreciated.

Regards,

Marco.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2009
Added on Oct 23 2008
15 comments
952 views