scalable layouts : Java Glossary
home S words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2008-04-04 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
scalable layouts
Java has a problem when Applets or applications are run on very small or very big screen, or very low resolution or very high resolution screens. The essential problem is Java is based around physical pixels. Ideally, applications should scale to maintain an acceptable viewing size. The layouts should rearrange and shrink, removing optional fields or labels, and otherwise simplify in low-real estate situations and expand when screen real estate is abundant.
PostScript Tools
Problem Areas Learning More
Solutions Links

PostScript

PostScript was invented long before Java, yet supports resolution independence with a floating point API that is scaled to physical pixels. This lets you render the same image on a 640 × 480 screen or a 1024 dpi typsetter without modification. Even it has to bow to the physical pixel reality with font rendering hints and special rounding to pixel boundaries. At one point Java was about to adopt Bravo PostScript rendering, then the project faded away without explanation.

Problem Areas

What are the problem areas for autoscaling?

Solutions

There are no totally satisfactory solutions, however, there are a number of band-aids. Karsten Lentzsch of JGoodies has done most of the research and documenting of the problem. Read his white papers and use his tools.

There are some techniques you can work with:

Tools

import java.awt.Dimension;
import java.awt.Toolkit;

...

// Get screen size in pixels, width by height.
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();

// Get screen resolution in dots per inch.
// The Americans who develop Java have not noticed the world has gone metric.
int dpi = Toolkit.getDefaultToolkit().getScreenResolution();

Learning More

Sun’s Javadoc on the getScreenSize method : available:
Sun’s Javadoc on the getScreenResolution method : available:

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Spread the Net
You are visitor number 11.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/scalable.html J:\mindprod\jgloss\scalable.html