Re: Swing application getting affected by screen resolution



The sad fact is that by the time the monitor resolution gets to 1600x1200
or larger the frames and controls will be unusably small.

Font sizes will adjust to the system DPI for theWindows L&Fs and the
Mac L&F under Swing (on their corresponding systems, of course). It's
easy enough to make your application's fonts adjust to the system DPI for
other Swing L&Fs in a global way (and also provide user-adjustable global
font scaling to help out users on systems where the DPI is unadjustable
and inappropriate). Fixed sized margins and borders don't normally hurt
usability for the range of monitor resolutions in common use, and can be
scaled where necessary. Some icons can be self-drawn and auto-scaling,
while others can be chosen from multiple-sized sets, though this is not
frequently done.

I operate at 1600x1200 on a 20 inch screen and dpi set to 144, and most
Java apps that I use are fine, or at least scale appropriately under Windows
L&F. I expect that 3200x2400 and 288 dpi on the same screen would
result in some issues with tiny icons, tight margins, and nearly invisible
borders for most Java applications. If monitors with that kind of resolution
become common, many Java applications will need some reworking to
make them usable.


.



Relevant Pages

  • Re: Swing application getting affected by screen resolution
    ... Font sizes will adjust to the system DPI for theWindows L&Fs and the ...
    (comp.lang.java.gui)
  • Re: Large Fonts
    ... The effects vary from one machine to the next of course, but generally in Windows all True Type fonts (including the Verdana 8 point he is using) are required to be "whole pixel" values, so that on most machines if you ask for 8 point Verdana you will actually get 8.25 points. ... Similar considerations also come into effect when you switch between "Windows small fonts setting" (96 dpi) and "Windows large fonts setting". ... So in the author's specific case he would quite probably see the effect he described (the size of the "container" or button or whatever expanding by a larger percentage than the size of the font which it contains). ... In my case the height of a Command Button increased by 25 per cent, as expected, when changing from 96 dpi to 120 dpi, but the height of the font increased by only 12 per cent, but at 9 points there was virtually no difference at all between the two, and at 10 point Verdana I had the opposite effect, where the height of the Command Button increased by 25 per cent but the height of the font increased by 33 per cent. ...
    (microsoft.public.vb.general.discussion)
  • Re: Dialog size in pixel
    ... In CE, in particular, the use of the FlySpeck 3 font is the way most programmers ... If a user changes DPI, ... I have to draw/set a bitmap as background of my dialog. ... If user change de display settings "DPI", the dialog size will changeand I ...
    (microsoft.public.vc.mfc)
  • Re: 120 DPI & HTML text woes
    ... setting of 120 DPI, everything else is great, but now standard ... and look in the various components where text size and font are ... As far as web browsers are concerned, ...
    (comp.infosystems.www.authoring.html)
  • Re: adjusting fonts to computers dpi settings
    ... After watching my app under 120 dpi I came to conclusion that if I summarily ... change the font to MS Serif and decrease font size to 6 ... How can I do that without accessing each control separetely? ... as Control Panel and the programs within it) or Windows ...
    (microsoft.public.vb.general.discussion)