Software must support the user's settings for font size but how itworks with swing?

M

Markus Lemcke

I make a java software accessible. One rule ist the following:

1. Software must support the user's settings for font, size and color. Software that provides
custom application settings for font, size and color must provide the user an option to choose
the systems settings for displayed information rather than using the custom application settings
provided by the software.

What I must code in Java with swing, that my software display the system font size?

Greetings


Markus Lemcke
http://www.marlem-software.de/marlemblog/
 
S

Stanimir Stamenkov

Sat, 27 Apr 2013 14:00:42 -0700 (PDT), /Markus Lemcke/:
I make a java software accessible. One rule ist the following:

1. Software must support the user's settings for font, size and color. Software that provides
custom application settings for font, size and color must provide the user an option to choose
the systems settings for displayed information rather than using the custom application settings
provided by the software.

What I must code in Java with swing, that my software display the system font size?

May be your best bet is to use the SystemLookAndFeel:

http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

In practice, at least on Windows it doesn't use the user configured
"caption" and "message" fonts for most components like lists, trees
and tables (like Windows Explorer does, for example), but just the
fixed Windows "system font" which only changes in size depending on
the system DPI setting.
 
S

Stanimir Stamenkov

Sun, 28 Apr 2013 01:25:16 +0300, /Stanimir Stamenkov/:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

In practice, at least on Windows it doesn't get the user configured
"caption" and "message" fonts for most components like lists, trees
and tables (like Windows Explorer does, for example), but just the
fixed Windows "system font" which only changes in size depending on
the system DPI setting.

I remember previously hacking the Windows L&F for that purpose by
reading the corresponding desktop property:

http://docs.oracle.com/javase/6/docs/technotes/guides/swing/1.4/w2k_props.html
 
J

Jeff Higgins

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top