Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
Run the application FontTest (see below) on a JDK with the changes put back by the 2D team on 1998.04.28, and in the Japanese locale. The application should draw a string containing the German sharp-s character, small and full-size Japanese hiragana-a characters, and "abc", each one several times. Only the "abc" is drawn as itself, all the non-ASCII characters are rendered as random ASCII characters. The application works fine on the JDK-1.2beta4-C build. --------------------------------------------------------------- import java.awt.*; import java.awt.event.*; import java.text.*; public class FontTest extends Frame { public FontTest() { setTitle("Font Test"); setSize(400, 400); add(new FontTestCanvas(), "North"); show(); getComponent(0).requestFocus(); } public static void main(String argv[]) { FontTest test = new FontTest(); } } class FontTestCanvas extends Canvas { FontTestCanvas() { super(); setSize(300, 80); setBackground(Color.cyan); setVisible(true); setEnabled(true); } public void paint(Graphics g) { super.paint(g); g.setColor(getForeground()); g.drawString("\u00df\u3041\u3042\u00df\u3041\u3042\u00df\u3041abc\u3042\u00dfabc", 5, 15); } }
|