can I obtain information about the monitor by programming in Java?

Discussion in 'Java' started by lucy, Jul 31, 2004.

  1. lucy

    lucy Guest

    Hi all,

    I need your help on this. I need to automatically obtain information about
    the monitor both on Linux and Windows. So I chose to program in Java.
    Basically, I need the physical dimension of the monitor and its gamma value
    and all other valuable information about the monitor which is stored
    somewhere by the monitor manufactorer.

    For example, can I get the diagonal viewable size of the monitor using Java?
    (say 20.1" LCD, etc.)

    How to do that?

    thank you so much,

    -Lucy
     
    lucy, Jul 31, 2004
    #1
    1. Advertising

  2. In article <ceem92$m5$>, "lucy" <>
    wrote:

    > Basically, I need the physical dimension of the monitor and its gamma value
    > and all other valuable information about the monitor which is stored
    > somewhere by the monitor manufactorer.


    Lucy, take a look at the following classes in your Java Docs:

    Toolkit
    GraphicsEnvironment
    GraphicsDevice
    GraphicsConfiguration

    --gordy
     
    Gordon Tillman, Jul 31, 2004
    #2
    1. Advertising

  3. lucy

    lucy Guest

    "Gordon Tillman" <> wrote in message
    news:...
    > In article <ceem92$m5$>, "lucy" <>
    > wrote:
    >
    > > Basically, I need the physical dimension of the monitor and its gamma

    value
    > > and all other valuable information about the monitor which is stored
    > > somewhere by the monitor manufactorer.

    >
    > Lucy, take a look at the following classes in your Java Docs:
    >
    > Toolkit
    > GraphicsEnvironment
    > GraphicsDevice
    > GraphicsConfiguration
    >
    > --gordy


    Hi, I looked into the above sections over and over and did not find the
    properties I need. I did find a getScreenResolutions and I used it as
    follows:

    a=Toolkit.getDefaultToolkit();
    b=a.getScreenResolutions(); //it suppose to return pixel resolution in
    dots per inch
    but no matter how I change my screen resolution on Windows XP, it always
    return 120.

    120 dots per inch cannot be correct, since i am using 1024x768,

    1024/120=8inch,
    768/120 =6inch,

    diagonal size is 10inch, but I am not just using a 10 inch monitor, right?

    So it is not correct at all...

    Any more ideas?

    -Lucy
     
    lucy, Aug 1, 2004
    #3
  4. "lucy" <> wrote in message
    news:cehf6d$i6f$...
    > ...
    > Hi, I looked into the above sections over and over and did not find the
    > properties I need. I did find a getScreenResolutions and I used it as
    > follows:
    >
    > a=Toolkit.getDefaultToolkit();
    > b=a.getScreenResolutions(); //it suppose to return pixel resolution in
    > dots per inch
    > but no matter how I change my screen resolution on Windows XP, it always
    > return 120.
    >
    > 120 dots per inch cannot be correct, since i am using 1024x768,
    >
    > 1024/120=8inch,
    > 768/120 =6inch,
    >
    > diagonal size is 10inch, but I am not just using a 10 inch monitor, right?


    For Windows and probably all other operating systems, the OS
    uses what you tell it for the screen resolution. There is no
    communication with the monitor to determine the actual size.
    On XP the effective size can be changed using desktop
    properties, "Settings" tab, "Advanced", "General" tab,
    "DPI setting". Toolkit.getScreenResolution() correctly
    returns this value.
     
    Larry Barowski, Aug 2, 2004
    #4
  5. lucy

    lucy Guest

    "Larry Barowski" <larrybarATengDOTauburnDOTeduANDthatISall> wrote in message
    news:...
    >
    > "lucy" <> wrote in message
    > news:cehf6d$i6f$...
    > > ...
    > > Hi, I looked into the above sections over and over and did not find the
    > > properties I need. I did find a getScreenResolutions and I used it as
    > > follows:
    > >
    > > a=Toolkit.getDefaultToolkit();
    > > b=a.getScreenResolutions(); //it suppose to return pixel resolution in
    > > dots per inch
    > > but no matter how I change my screen resolution on Windows XP, it always
    > > return 120.
    > >
    > > 120 dots per inch cannot be correct, since i am using 1024x768,
    > >
    > > 1024/120=8inch,
    > > 768/120 =6inch,
    > >
    > > diagonal size is 10inch, but I am not just using a 10 inch monitor,

    right?
    >
    > For Windows and probably all other operating systems, the OS
    > uses what you tell it for the screen resolution. There is no
    > communication with the monitor to determine the actual size.
    > On XP the effective size can be changed using desktop
    > properties, "Settings" tab, "Advanced", "General" tab,
    > "DPI setting". Toolkit.getScreenResolution() correctly
    > returns this value.
    >
    >


    Hi thank you very much for your answer. I did saw a 120DPI under the DPI
    settings. But it does not make sense. Because the diagonal size will be
    10in, but I am using a 20inch monitor. I now feel confused about Windows XP
    settings. Maybe it is just a setting for font? I previously also have seen
    this option under Windows 2000, 98, ME, etc.

    Any more thoughts?

    Thanks a lot,

    -Lucy
     
    lucy, Aug 2, 2004
    #5
  6. "lucy" <> wrote in message
    news:cekkh4$i0c$...
    > ...
    > Hi thank you very much for your answer. I did saw a 120DPI under the DPI
    > settings. But it does not make sense. Because the diagonal size will be
    > 10in, but I am using a 20inch monitor. I now feel confused about Windows

    XP
    > settings. Maybe it is just a setting for font? I previously also have seen
    > this option under Windows 2000, 98, ME, etc.


    Yes, the DPI setting will change the meaning of "point" sized
    fonts, and images that are shown "actual size" in some applications.
    The question is, do you want an 8 point font on the screen to be
    the same size as an 8 point font on paper? At a particular size,
    things are generally easier to read on paper than on a screen, and
    you will probably read on paper at a closer distance than on a
    screen, so having the dpi set higher than it really is may be a good
    thing. I run at 1600x1200 on a 20 inch LCD, which is exactly
    100 dpi, but use a 144 dpi setting.
     
    Larry Barowski, Aug 2, 2004
    #6
  7. lucy

    lucy Guest

    "Larry Barowski" <larrybarATengDOTauburnDOTeduANDthatISall> wrote in message
    news:...
    >
    > "lucy" <> wrote in message
    > news:cekkh4$i0c$...
    > > ...
    > > Hi thank you very much for your answer. I did saw a 120DPI under the DPI
    > > settings. But it does not make sense. Because the diagonal size will be
    > > 10in, but I am using a 20inch monitor. I now feel confused about Windows

    > XP
    > > settings. Maybe it is just a setting for font? I previously also have

    seen
    > > this option under Windows 2000, 98, ME, etc.

    >
    > Yes, the DPI setting will change the meaning of "point" sized
    > fonts, and images that are shown "actual size" in some applications.
    > The question is, do you want an 8 point font on the screen to be
    > the same size as an 8 point font on paper? At a particular size,
    > things are generally easier to read on paper than on a screen, and
    > you will probably read on paper at a closer distance than on a
    > screen, so having the dpi set higher than it really is may be a good
    > thing. I run at 1600x1200 on a 20 inch LCD, which is exactly
    > 100 dpi, but use a 144 dpi setting.
    >
    >


    But I really want to know the physical viewable size of the screen...
     
    lucy, Aug 2, 2004
    #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. James
    Replies:
    0
    Views:
    402
    James
    Jan 15, 2006
  2. Prabhakar
    Replies:
    1
    Views:
    379
    Hal Rosser
    Feb 15, 2008
  3. ScottZ
    Replies:
    2
    Views:
    361
    Jorgen Grahn
    Nov 2, 2008
  4. Eric Sosman
    Replies:
    0
    Views:
    177
    Eric Sosman
    Mar 21, 2014
  5. Roedy Green
    Replies:
    4
    Views:
    195
    Andreas Leitgeb
    Mar 22, 2014
Loading...

Share This Page