Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

The Scale problem

Thread view: 
Roedy Green - 29 Apr 2007 05:49 GMT
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
Rangitane MacDonald - 29 Apr 2007 09:36 GMT
> I wrote about this problem many years ago as something I saw looming.
> Now its has arrived. http://mindprod.com/jgloss/resolution.html
[quoted text clipped - 16 lines]
> 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
Knute Johnson - 30 Apr 2007 01:19 GMT
> I wrote about this problem many years ago as something I saw looming.
> Now its has arrived. http://mindprod.com/jgloss/resolution.html
[quoted text clipped - 16 lines]
> 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?

Signature

Knute Johnson
email s/nospam/knute/

Andrew Thompson - 30 Apr 2007 09:53 GMT
Roedy Green wrote:
> Knute Johnson wrote:
>> I wrote about this problem many years ago as something I saw looming.
>> Now its has arrived. http://mindprod.com/jgloss/resolution.html
...
>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.
Dag Sunde - 30 Apr 2007 10:08 GMT
> Roedy Green wrote:
>> Knute Johnson wrote:
[quoted text clipped - 16 lines]
> 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

Signature

Dag.

Richard Senior - 30 Apr 2007 10:29 GMT
> Here is my 1st hackish attempt at producing a
> text size in an AWT based (TextArea/Label)
[quoted text clipped - 5 lines]
> 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(!)

Signature

Regards,

Richard

Andrew Thompson - 30 Apr 2007 11:03 GMT
> Andrew T. wrote
>> Here is my 1st hackish attempt ...
..
>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.

Signature

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

Richard Senior - 30 Apr 2007 12:21 GMT
>> Andrew T. wrote
>>> Here is my 1st hackish attempt ...
[quoted text clipped - 5 lines]
> 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

>> 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?

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.

Signature

Regards,

Richard

a24900@googlemail.com - 30 Apr 2007 18:45 GMT
> >Mozilla Firefox, 2.0.0.3, Sun, 1.6.0, 1440x900, 9px to 167px(!)

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.
Andrew Thompson - 30 Apr 2007 17:55 GMT
>Roedy Green wrote:
>> Knute Johnson wrote:
>>> I wrote about this problem many years ago as something I saw looming.
>>> Now its has arrived. http://mindprod.com/jgloss/resolution.html
>...
>>I think it will soon be a really big problem.  ..
..
>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, .. ;).

Signature

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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.