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

There are difference of presentation between 1.1.8 and 1.3 on the applet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • 2d
    • beta2
    • x86
    • windows_nt

      There are differences of presentation between 1.1.8 and 1.3 on the applet.

      1) Strings on 1.1.8 are displayed in the upper part of TextField. (JAPANESE KANJI).
      2) Strings on 1.3 applet is blurred a little than 1.1.8 (JAPANESE KANJI)

      ----------------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;
      import java.applet.*;

      public class test extends Applet{

      public static String[] realFontName ={"SansSerif","Serif","Monospaced"};

      public void init(){
      setLayout(null);
      FormPanel fm = new FormPanel("JAPANESE KANJI IS PLACED HERE!");
      add(fm);
      fm.setLayout(null);
      fm.setBounds(0,0,500,200);
      fm.setBackground(Color.lightGray);

      LabelBox lb = new LabelBox("JAPANESE KANJI IS PLACED HERE! "));
      fm.add(lb);
      lb.setBounds(50,50,200,30);
      lb.setBackground(Color.green);

      int fontNo = 0;
      //int style = Font.BOLD | Font.ITALIC;
      int style = Font.BOLD;
      int size = 20;
      fm.setFont(new Font(realFontName[fontNo],style,size));
      lb.setFont(new Font(realFontName[fontNo],style,size));
      }

      class FormPanel extends Panel{
      private String title;

      public FormPanel(String st){
      title = st;
      }

      public void paint(Graphics g){
      g.drawString(title+" ",0,30);
      g.drawString("Java Version = " java.lang.System.getProperty("java.version")+" ",0,getSize().height-2);
      }
      }

      class LabelBox extends Canvas{
      private String label;

      public LabelBox(String st){
      label = st;
      }
      public void paint(Graphics g){
      g.drawString(label+" ",0,20);
      }
      }

      }
      ----------------------------------------------------------------------
      set path=F:\jdk1.1.8\win\bin
      appletviewer test.html

      if errorLevel 1 goto PAUSE
      exit

      :PAUSE
      pause
      -----------------------------------------------------------------------
      set path=F:\jdk1.3\win\bin
      appletviewer test.html
      if errorLevel 1 goto PAUSE
      exit

      :PAUSE
      pause
      -----------------------------------------------------------------------

            prr Philip Race
            mkamito Masaaki Kamito (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: