
Signature
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
> any ideas?
Up the steep, rocky path of display scaling lies "AffineTransform."
There's really no device-independent scaling in Java, unfortunately.
steve - 14 Apr 2006 05:04 GMT
>> any ideas?
>
> Up the steep, rocky path of display scaling lies "AffineTransform."
> There's really no device-independent scaling in Java, unfortunately.
sorry my fault.
I was talking about components, such as when a jframe is rescaled by a user,
how to make the other items internal to the jframe rescale., fonts to
change (on buttons, in menus)
as for images (as in rescale , i have that down to a fine art)
steve

Signature
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Tony Morris - 15 Apr 2006 01:41 GMT
>>> any ideas?
>>
[quoted text clipped - 9 lines]
>
> steve
You use a layout manager.
Start here:
http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html
http://javafaq.mine.nu/lookup?290

Signature
Tony Morris
http://tmorris.net/
s/Commonwealth Games/Commonwealth Swimming
> Hi,
>
[quoted text clipped - 7 lines]
>
> obviously at 1024*760 -1280x1024 things are going to be a bit spartan.
800x600 is a screen size, 144 dpi is a screen resolution. For a
"normal" application, if you want to scale fonts (mentioned in
Steve's later post in this thread), you should scale them based
on screen resolution (and, possibly, user preference), not
screen size. This way they will (ideally) match fonts in other
applications on the system. Resolution is available through
Toolkit.getDefaultToolkit().getScreenResolution() . The
Windows L&F already scales fonts based on the screen
resolution. For other L&Fs, you would scale by
screen_resolution / 72.0 . I don't think Java has any resolution
information on non-Windows systems though (they will all
appear to be 72 dpi) - I could be wrong here. Search Google
groups for "change default swing font size" for information
on scaling all UI fonts in the standard L&Fs.
As far as frame size, if it makes functional sense to resize the
frames, then you could start them out at some fraction of the
screen size. This is available through
Toolkit.getDefaultToolkit().getScreenSize() . On the other hand,
if it makes sense to have fixed-size frames, you should pack()
them to determine the correct size.