ECS Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
JAVA/Linux screen-dimension difficulty
Mark Gilmore
Thu, 25 Sep 2003 12:04:07 -0700
Thu, 25 Sep 2003 12:04:07 -0700
Can anyone tell me why *all"* these calls return 1024/768,
though my display res is set for 800x600 ?:

         Dimension screen_dim;
         screen_dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
         print("dim=" + screen_dim);     // Note that this returns 800x600 
in Windows

         GraphicsEnvironment ge = null;
         ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         GraphicsDevice gd = ge.getDefaultScreenDevice();

         DisplayMode dm = gd.getDisplayMode();
         print("h=" + dm.getHeight());
         print("w=" + dm.getWidth());

         GraphicsConfiguration gc = gd.getDefaultConfiguration();
         print("bounds=" + gc.getBounds());

Also (related), is there a way to get the dimensions of the "usable" screen 
area
(i.e. that above the Linux taskbar area) ?

Thanks,

Mark Gilmore
http://OmnipotenceSoftware.com 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.