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

Discussion in 'Java' started by Markus Lemcke, Apr 27, 2013.

  1. 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/
    Markus Lemcke, Apr 27, 2013
    #1
    1. Advertising

  2. Re: Software must support the user's settings for font size but howit works with swing?

    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.

    --
    Stanimir
    Stanimir Stamenkov, Apr 27, 2013
    #2
    1. Advertising

  3. Re: Software must support the user's settings for font size but howit works with swing?

    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

    --
    Stanimir
    Stanimir Stamenkov, Apr 28, 2013
    #3
  4. Markus Lemcke

    Jeff Higgins Guest

    Re: Software must support the user's settings for font size but howit works with swing?

    On 04/27/2013 05:00 PM, Markus Lemcke wrote:
    > I make a java software accessible.


    Again, I would suggest a more specialized forum.

    https://forums.oracle.com/forums/forum.jspa?forumID=952
    Jeff Higgins, Apr 28, 2013
    #4
  5. Re: Software must support the user's settings for font size but howit works with swing?

    Sat, 27 Apr 2013 19:14:53 -0400, /Jeff Higgins/:
    > On 04/27/2013 05:00 PM, Markus Lemcke wrote:
    >
    >> I make a java software accessible.
    >> [...]
    >> What I must code in Java with swing, that my software display the system font size?

    >
    > Again, I would suggest a more specialized forum.
    >
    > https://forums.oracle.com/forums/forum.jspa?forumID=952


    I guess "comp.lang.java.gui" should be appropriate, too?

    --
    Stanimir
    Stanimir Stamenkov, Apr 28, 2013
    #5
  6. Markus Lemcke

    Jeff Higgins Guest

    Re: Software must support the user's settings for font size but howit works with swing?

    On 04/27/2013 07:19 PM, Stanimir Stamenkov wrote:
    > Sat, 27 Apr 2013 19:14:53 -0400, /Jeff Higgins/:
    >> On 04/27/2013 05:00 PM, Markus Lemcke wrote:
    >>
    >>> I make a java software accessible.
    >>> [...]
    >>> What I must code in Java with swing, that my software display the
    >>> system font size?

    >>
    >> Again, I would suggest a more specialized forum.
    >>
    >> https://forums.oracle.com/forums/forum.jspa?forumID=952

    >
    > I guess "comp.lang.java.gui" should be appropriate, too?
    >

    As far as topic. The Oracle Accessibility forum is
    more focused and a much higher volume. ^Shrug.
    Jeff Higgins, Apr 28, 2013
    #6
  7. Markus Lemcke

    Roedy Green Guest

    Re: Software must support the user's settings for font size but how it works with swing?

    On Sat, 27 Apr 2013 14:00:42 -0700 (PDT), Markus Lemcke
    <> wrote, quoted or indirectly quoted
    someone who said :

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


    have a look at http://mindprod.com/applet/fontshower.html
    It is an app for displaying sample fonts in various colours and sizes.
    --
    Roedy Green Canadian Mind Products http://mindprod.com
    Nothing is so good as it seems beforehand.
    ~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)
    Roedy Green, May 1, 2013
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. teddykim
    Replies:
    5
    Views:
    400
    Steven J Sobol
    Jul 21, 2004
  2. Roedy Green

    AWT font != Swing Font

    Roedy Green, Aug 8, 2005, in forum: Java
    Replies:
    0
    Views:
    474
    Roedy Green
    Aug 8, 2005
  3. Wongod
    Replies:
    2
    Views:
    707
  4. mttc
    Replies:
    2
    Views:
    2,382
    Roedy Green
    Jul 3, 2009
  5. donet programmer
    Replies:
    3
    Views:
    1,534
    Gregory A. Beamer
    Nov 20, 2009
Loading...

Share This Page