Hi all,
I am using JDK 1.1.8 for an
Applet development. To preserve the look and feel, I need to use variable width fonts with the AWT List components. I can't use fixed width fonts.
A List cannot have multiple columns, so I am concatenating the two Strings (with spaces between them for an offset). The problem is that I can't get the second
String perfectly aligned. I am using the FontMetrics class to calculate the width of the first String and pad enough spaces to get the right offset. But because the width of the alphabet is not in multiples of the width of the space character, the alignment of the second String is slightly off.
Is there any special/control character that I can use in place of the space? Or is there any other approach to this problem?
Thanks in advance,
Krishna