The Scale problem

R

Roedy Green

I wrote about this problem many years ago as something I saw looming.
Now its has arrived. http://mindprod.com/jgloss/resolution.html

I have a new big high-res monitor and my Applets have shrunk to pin
pricks with unreadably small type. People used to tease me for my
outsized fonts and generous layouts. Now even they are far too small.
How do you go about writing apps that will be readable on a wide
variety of screens?

I know JGoodies has some tools for resolution independent layout.. But
I was wondering what could be done to existing apps that did not take
a major rewrite. I can live with icons not being scaled.

This needs to be builtin to Java so that when the user tells one
app/Applet his desired zoom, it will automatically apply universally.
 
R

Rangitane MacDonald

Roedy said:
I wrote about this problem many years ago as something I saw looming.
Now its has arrived. http://mindprod.com/jgloss/resolution.html

I have a new big high-res monitor and my Applets have shrunk to pin
pricks with unreadably small type. People used to tease me for my
outsized fonts and generous layouts. Now even they are far too small.
How do you go about writing apps that will be readable on a wide
variety of screens?

I know JGoodies has some tools for resolution independent layout.. But
I was wondering what could be done to existing apps that did not take
a major rewrite. I can live with icons not being scaled.

This needs to be builtin to Java so that when the user tells one
app/Applet his desired zoom, it will automatically apply universally.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


ummmmm as far as readibility goes, I figure you should still be able to
read stuff. Why? because it IS high res. Most of us actually do want to
fit more on our screens (at least I do) so,smaller yet still readable is
a good thing...

I use to draw alot of circuit board layouts yonks ago when montiros were
crappy. Onscreen the tracks and pads often looked like they touched, yet
when printed and according to specs, obviously they were fine. I'm sure
a high res monitor at the time would have showed smaller, yet more
reailistic image representations ie... pads and tracks would have
appeared not to touch (on screen) as they should have been.

R e a l e m a i l : t a n e @ m u g w h y .c o m
 
K

Knute Johnson

Roedy said:
I wrote about this problem many years ago as something I saw looming.
Now its has arrived. http://mindprod.com/jgloss/resolution.html

I have a new big high-res monitor and my Applets have shrunk to pin
pricks with unreadably small type. People used to tease me for my
outsized fonts and generous layouts. Now even they are far too small.
How do you go about writing apps that will be readable on a wide
variety of screens?

I know JGoodies has some tools for resolution independent layout.. But
I was wondering what could be done to existing apps that did not take
a major rewrite. I can live with icons not being scaled.

This needs to be builtin to Java so that when the user tells one
app/Applet his desired zoom, it will automatically apply universally.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

I think it will soon be a really big problem. The new high resolution
monitors are almost impossible to use for the user interface. I just
did a big job that used a bunch of 1600x1200 resolution displays. We
still had to have one monitor that was 1024x768 so we could display the
GUI at a size that the user could read.

Java needs a feature to scale the windows and their components so they
are readable on high res monitors. It is unfortunate that Java sizes
components by pixel rather than by physical dimension.

The 1600x1200 displays are difficult enough but what is it going to be
like when the monitors are 4000x3000?
 
A

Andrew Thompson

Roedy said:
...
I think it will soon be a really big problem. ..

The mention in Roedy's page of PLAF's, got me to
wonderring what could be done for 'poor old AWT'.

Here is my 1st hackish attempt at producing a
text size in an AWT based (TextArea/Label)
applet, that adjusts according to the font size
used for the HTML.
<http://www.physci.org/test/textsize/>

So far I have only seen it work for IE on one screen
size. Does it work for you? (I want the details listed
in the table at the bottom, ideally.)

* If this technique were to be used for an AWT based
GUI with many components, it would probably be
better to iterate the available components, rather
than explicitly code them as I did in this example.
For Swing, the 'size aware' PLAF would obviously
be the best tactic to pursue.
 
D

Dag Sunde

Andrew said:
The mention in Roedy's page of PLAF's, got me to
wonderring what could be done for 'poor old AWT'.

Here is my 1st hackish attempt at producing a
text size in an AWT based (TextArea/Label)
applet, that adjusts according to the font size
used for the HTML.
<http://www.physci.org/test/textsize/>

So far I have only seen it work for IE on one screen
size. Does it work for you? (I want the details listed
in the table at the bottom, ideally.)

Works nicely in Firefox 2.0.0.3 with JRE 1.5.0_11
 
R

Richard Senior

Andrew said:
Here is my 1st hackish attempt at producing a
text size in an AWT based (TextArea/Label)
applet, that adjusts according to the font size
used for the HTML.
<http://www.physci.org/test/textsize/>

So far I have only seen it work for IE on one screen
size. Does it work for you? (I want the details listed
in the table at the bottom, ideally.)

Works well for me.

Internet Explorer, 6.0.2800.1106, Sun, 1.6.0, 1440x900, 11px to 19px
Mozilla Firefox, 2.0.0.3, Sun, 1.6.0, 1440x900, 9px to 167px(!)
 
A

Andrew Thompson

Richard said:
Andrew T. wrote ..
Internet Explorer, 6.0.2800.1106, Sun, 1.6.0, 1440x900, 11px to 19px

I am a little dissapointed to hear that IE shows the
same values as for a significantly smaller (1024x768)
screen. Is the HTML and applet text roughly the
same size? (It is in my tests.)
Mozilla Firefox, 2.0.0.3, Sun, 1.6.0, 1440x900, 9px to 167px(!)

That is enormous! Does the applet force horizontal
scrollbars before it hits this huge size?

Thanks for the details - I'll update the page.
 
R

Richard Senior

Andrew said:
I am a little dissapointed to hear that IE shows the
same values as for a significantly smaller (1024x768)
screen. Is the HTML and applet text roughly the
same size? (It is in my tests.)

Roughly but not exactly. Using Arial as the default browser font, which
seems the closest match to the sans-serif of the applet, I would estimate:

Smallest: applet shows 11px (slightly smaller); browser I guess is 12px
Smaller: looks the same
Medium: applet shows 14px (slightly smaller); browser I guess is 15/16px
Larger: applet shows 17px (slightly smaller); browser 18-20px and bold
Largest: applet shows 19px (slightly smaller); browser 20-22px both bold
That is enormous! Does the applet force horizontal
scrollbars before it hits this huge size?

Scrollbars appear in the main browser window, not in the applet. The
applet just gets proportionally bigger.

The maximum font size shown by the applet, but not the minumum, depends
on the default font in Firefox. If I set the default font to 9pt, I only
;) get up to 125px in the applet. If I set the default to 72pt, it goes
from 9px to a billboard-tastic 1002px! At that size, the string "px."
completely fills my 1440x900 screen!

Something else I did notice was that, when the applet is so large that
the paragraph to the right of it can't flow around it and has to go
below, the right-hand edge of the applet sticks out of the yellow box. I
suspect it's a browser/stylesheet issue - maybe to do with the margin of
the yellow box. If I get it to about 30px and bring the right edge of
the browser window in, the margin to the right of the yellow box pushes
the yellow box in until the applet hangs out of the box, then the
browser starts clipping the box and applet.
 
A

Andrew Thompson

Andrew said:
..
Here is my 1st hackish attempt at producing a
text (re)size in an AWT based (GUI)..

..and here is Swing (same caveats)
<http://www.physci.org/test/textsize/swing.html>

Particularly interested to hear any results for Opera,
always had trouble with that (damnable) browser, or other
non 'big 2' UA's (Safari, Konquerer, TenCentTraveller(?),
Lynx, .. ;).

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
 
A

a24900

The min size is probably limited by the configuration in the
Preferences->Content->Fonts & Colors pane.

Using 2.0.0.2 I can't go below 12px, but I can go up to 194px.
Occasionally the applet gets cropped, not resized when first
increasing the size and then going back to the minimum size. Then the
12px applet is sometimes cropped.

The problem with high-res monitors is not only with text sizes.
Widgets like scrollbars also become quickly unusable. The Substance
PLAF can already handle this and scale widgets. And Java 7 is supposed
to scale, too. If Sun doesn't screw up once again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

comp.lang.java.gui FAQ 0
comp.lang.java.gui FAQ 0

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top