Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4447727

Using Win98 and JDK 1.3 the Euro sign(\u20ac) is not visible in Swing components

XMLWordPrintable

    • 05
    • x86
    • windows_98
    • Verified



        Name: yyT116575 Date: 04/19/2001


        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
        Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

        Using Win98 and JDK 1.3.x the Euro sign (\u20ac) is not visible in Swing
        components (cp1252, Locale: de_DE, de_DE_EURO).
        Also using Graphics::drawString(String str,int x,int y) doesn?t show this sign
        (printing, rendering to a JPanel).
        AWT-components show this sign correct.
        There is no problem with Win2k and NT 4.0. Also JDK 1.2.x on Win98 makes no
        problems.

        Sample 1 (doesn't show Euro sign with JDK1.3 and Win98):

        import javax.swing.*;
        class TestFrame extends JFrame {

          public TestFrame() {
            super();
            setSize(400, 200);
            getContentPane().add(new JLabel("\u20ac"));
          }

          public static void main(String[] args) {
            TestFrame aTestFrame;
            aTestFrame = new TestFrame();
            aTestFrame.show();
          }
        }

        Sample 2 (ok with AWT):

        import java.awt.*;
        class TestAWTFrame extends Frame {

          public TestAWTFrame() {
            super();
            setSize(400, 200);
            add(new Label("\u20ac"));
          }

          public static void main(String[] args) {
            TestAWTFrame aTestFrame;
            aTestFrame = new TestAWTFrame();
            aTestFrame.show();
          }
        }
        (Review ID: 121004)
        ======================================================================

              sherman Xueming Shen
              yyoungsunw Yung-ching Young (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: