Java Reference
In-Depth Information
Toolkit theKit = Toolkit.getDefaultToolkit();
System.out.println("\nScreen Resolution: "
+ theKit.getScreenResolution() + " dots per inch");
Dimension screenDim = theKit.getScreenSize();
System.out.println("Screen Size: "
+ screenDim.width + " by "
+ screenDim.height + " pixels");
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontnames = e.getAvailableFontFamilyNames();
System.out.println("\nFonts available on this platform: ");
for (int i = 0; i < fontnames.length; i++)
System.out.println(fontnames[i]);
return;
}
}
On my system I get the following output:
Screen Resolution: 120 dots per inch
Screen Size: 1280 by 1024 pixels
Fonts available on this platform:
Abadi MT Condensed Light
Albertus
Albertus Extra Bold
Albertus Medium
Algerian
Alien
Allegro BT
AmerType Md BT
Andes
Angerthas
Antique Olive
Antique Olive Compact
Architect
Arial
Arial Alternative
Arial Alternative Symbol
Arial Black
Arial MT Black
...plus many more.
Search WWH ::




Custom Search