Re: Swing application getting affected by screen resolution




"Karsten Lentzsch" <karsten@xxxxxxxxxxxx> wrote in message
news:fb8kd1$i4i$01$1@xxxxxxxxxxxxxxxxxxxx
Larry Barowski wrote:
[...] 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. [...]

The range of monitors in teams I work with is about 78 dpi (hardware)
up to 144 hardware dpi. This leads to significantly sizes on the
higher dpi hardware. This affects borders, gaps, table column widths,
custom preferred sizes for trees and lists.

Therefore I use Dialog Units (DLU) for these sizes where possible.

For table column widths and preferred sizes for trees and lists, I
always base the size on the font currently used in the table, tree,
or list (assuming these items contain mostly text).

It's a good idea to use a global base value for margins and
possibly borders that can be keyed to the DPI or font size by
default, but is also adjustable by the user, separately from the
global font scale I mentioned before. If the user wants giant
fonts and tiny margins, they should be able to have them.


.



Relevant Pages

  • 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: Font in OE
    ... Click the font size you want to use.]] ... [[Lists the available DPI sizes for the selected monitor. ... Increasing the DPI increases the size of everything on your screen. ... [[The Accessibility Wizard guides you through the process of customizing ...
    (microsoft.public.windowsxp.customize)
  • 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)