The fineness of the monitor screen.
Introduction
If you look at the Windows Control Panel under Display, (or the equivalent) you can see that you can control the screen
resolution, typically something like 640x480, 800 × 600, 1024 × 768, 1280 × 1024, 1920 × 1080 (HDTV),
1920 × 1200 up to about 7680 × 4800. The image on your screen in made up of rows and columns of tiny
coloured dots called pixels. The number 1280 × 1024 means
the image is 1280 columns of dots wide by 1024 rows of dots high.
Low resolution would be 640 × 480 pixels (width × height). High resolution
would be 1280x1024. The Dell 15" WUXGA has 1920x1200. Because the more dots you have, the smaller they are, you
must compensate by using a larger monitor for high resolution, or the type will be too small to read.
If you double the resolution, there are four times as many dots. This means the video hardware has four times as much
work to do each second to keep the screen refreshed. Further, the computer has four times as many dots to render each
time the screen changes. For high resolutions, you thus need high performance video hardware.
Recent LCDs use a hardware resolution between 86dpi and 147dpi, only a few LCDs use a resolution around 204dpi (Toshiba,
IBM).
Measuring Resolution
To summarise, there are four way to measure resolution:
- total number of pixels (dots), e.g. 1280x1024. Bigger is better.
- diagonal size of the screen, e.g. 15" (LCD makers are more honest that CRT makers).
Bigger is better. Take a ruler to the showroom with you to get he honest figure.
- dpi, dots per inch, how densely the pixels are packed. Bigger is better. A 1280 × 1024
image on a 17" monitor is only about 100 dpi. A 1600 × 1200 image on a 19" monitor is about 111 dpi.
- dot pitch, how wide the physical sub-pixels are. Smaller in better. A typical monitor spaces
the red dots about 0.231 mm apart.
- VU. Visual Units. This is my personal proposal. One VU is the vertical distance between two
lines of type the user can comfortably read. It is the leading of the user’s preferred body font. What it
corresponds to in cm or pixels depends on many factors including visual acuity, personal preference and screen
resolution. My idea is you would design in visual units, and the user would configure the value of a visual unit in
pixels using a system wide slider in the Control Panel. The definition would then by used by the OS and all apps. The
user could adjust it an any time, causing a system wide revalidate. The GUI and layouts would still work in pixels at
the low level, but for various higher level methods you could specify co-ordinates and sizes in terms of a VU grid, or
perhaps in terms of integral MVUs, thousandths of a VU. The notion could be used both for designing screen layouts and
printed output easily readable by the user.
Trust your eyes not the specs. They are the ones that have to be happy with the image. It should not flicker or distort.
It should be sharp and clear.
Printed Resolution
- An old HP Laserjet printer is 300 dpi.
- Newsprint is about 500 dpi.
- A modern laser printer is usually 600 dpi.
- Modern ink-jet printers are about 4800 × 1200 dpi. They are limited mainly by ink smudging and the quality of the
paper.
- Glossy magazines and photypesetters are about 1200 dpi.
The Scale Problem
The problem is ordinary Java apps look too small on these high resolution screens, because Java apps are constructed in
pixels, not points or inches the way PostScript is. A program that draws an icon 32 pixels
high looks huge on a low res screen, but shrinks down to a mite on an ultra highres screen.
The free and open source JGoodies Forms layout
system addresses this issue; it support non-pixel sizes: pt, mm, cm, in and more important, it supports dialog units
(dlu) that scale with the resolution and dialog font size. Here is how to find the size and resolution of the screen to
use in adjusting your Font and Frame sizes.
import java.awt.Dimension;
import java.awt.Toolkit;
...
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
int dpi = Toolkit.getDefaultToolkit().getScreenResolution();
See a more detailed discussed under scalable layouts.
Learning More
Sun’s Javadoc on the
getScreenSize method : available:
Sun’s Javadoc on the
getScreenResolution method : available: