Operating System - HP-UX
1754253 Members
3447 Online
108812 Solutions
New Discussion

Re: JAVA: Font size and font shown differently in HP UX OS versions

 
Kripal_1
Occasional Advisor

JAVA: Font size and font shown differently in HP UX OS versions

Hi,

I have a java application (Java Client) is running on two servers. The java client has a GUI to input some test parameters.

Regarding Servers :

Both setvers are HP Unix servers with the following OS versions.

1) HP-UX B.11.00 A 9000/800 , java version "HP-UX Java C.01.17.00 99/02/08"

2) HP-UX B.10.20 A 9000/777, java version "1.3.1.02"


Problem with font size display :

When our application is launched on these two servers the GUI is showing differently.
We can see there are differences in the font size and also on the font type for text displayed on the GUI.
Also the buttons look different.


I read that AWT uses OS specific code to display AWT components and so is that the reason why the fonts are shown differently?
Could you please explain why the font size problem appearing and why is application taking a different font from the one which is specified in the java code for
the window , Font used is "Helvetica" with font size 10 and 14. (Please see the code snippet for the font from our code)



--->>

if (Toolkit.getDefaultToolkit().getFontMetrics
(new Font("Helvetica", 0, 14)).getHeight() > 17)
{
setAllFonts(10);
}
else
{
setAllFonts(14);
}
}

<<---

Request your comments on this behaviour.

Thanks in advance

Kripal
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: JAVA: Font size and font shown differently in HP UX OS versions

You may wish to update that 11.00 server to a more current version of java.

If both machines are on the same version there can be an expectation of similar behavior.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com