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

Difference of appletviewer presentation between 131_01a and 131_01 on WinNT(JP)

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      Difference of appletviewer presentation appears between 131_01a and 131_01 older on Japanese Windows NT4.0. No problem on English NT.
      This problem was verified by using test program sent by licensee to check the other bug.

      Test program is following:
      ----->8---------------->8----------
      //Application1.java
      package display_char1;


      public class Application1 {
        boolean packFrame = false;

        /**ÑóÑÚÑM-^JÑM-^Xí­Ñ¸ÑM-^GÑ^?ñðM- »ÈM-^Z*/
        public Application1() {
          Frame1 frame = new Frame1();
          if (packFrame) {
            frame.pack();
          }
          else {
            frame.validate();
          }
          frame.setVisible(true);
        }
        /**Main ÑßÑ»ÑÈÑÐ*/
        public static void main(String[] args) {
          new Application1();
        }
      }
      ---------->8---------->8--------------
      // Frame1.java
      package display_char1;

      import java.awt.*;
      import java.awt.event.*;

      public class Frame1 extends Frame {
      //java.lang.String cltFontName1="Serif";
        java.lang.String cltFontName1="SansSerif";
      //java.lang.String cltFontName1="Monospaced";
        int cltFontSize=12;
        int cltFieldWidth=60;
        int cltFieldHeight=32;
        Panel contentPane;
        Panel panel1 = new Panel();
        Panel panel2 = new Panel();
        Label label1 = new Label();
        Label label2 = new Label();
        TextField textField1 = new TextField();
        TextField textField2 = new TextField();
        TextField dataField3 = new TextField();
        TextField dataField4 = new TextField();
        TextField dataField5 = new TextField();
        FlowLayout flowLayout1 = new FlowLayout();
        GridLayout gridLayout1 = new GridLayout();

        /**ÑØÑM-í­ÑM-^@ñðM- »ÈM-^Z*/
        public Frame1() {
          enableEvents(AWTEvent.WINDOW_EVENT_MASK);
          try {
            jbInit();
          }
          catch(Exception e) {
            e.printStackTrace();
          }
        }
        /**ÑþÑ^?ÑM-^\í­ÑÍÑ^?Ñ®ñð»M- ³M-^RM-^Y»*/
        private void jbInit() throws Exception {
          this.setSize(new Dimension(600, 160));
          this.setTitle("display characters - "
                        +java.lang.System.getProperty("java.vm.name")
                        +" "+java.lang.System.getProperty("java.vm.version")
                        +" : "+java.lang.System.getProperty("java.home"));
          this.setLayout(flowLayout1);
          label1.setText(cltFontName1+" font Size");
          label2.setText("field Width");
          textField1.setText((java.lang.Integer.toString(cltFontSize)));
          textField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
              textField1_actionPerformed(e);
            }
          });
          textField2.setText("enter Width by points.");
          textField2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
              textField2_actionPerformed(e);
            }
          });
          dataField3.setText("00000000000000000000000000000000000000000000000000");
          dataField4.setText("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW");
          dataField5.setText("ñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñóñó");
          panel1.add(label1, null);
          panel1.add(textField1, null);
          panel1.add(label2, null);
          panel1.add(textField2, null);

          gridLayout1.setRows(3);
          gridLayout1.setColumns(1);
          gridLayout1.setVgap(5);
          panel2.setLayout(gridLayout1);
          panel2.setBackground(Color.green);
          panel2.setSize(400,120);
          panel2.add(dataField3, null);
          panel2.add(dataField4, null);
          panel2.add(dataField5, null);
          updateFont();
          this.add(panel1, null);
          this.add(panel2, null);
        }
        /**ѪÑúÑ^?ÑÐѪñ¼×ýñ¹ñM- ñM-ñÀñ®ñ¡ñÝ»¬ð©ñM- ñM-^KñM-^HñªñÝѬí­ÑÏí­ÑM- ÑñÑÐ*/
        protected void processWindowEvent(WindowEvent e) {
          super.processWindowEvent(e);
          if (e.getID() == WindowEvent.WINDOW_CLOSING) {
            System.exit(0);
          }
        }

        void updateFont(){
           dataField3.setFont(new java.awt.Font(cltFontName1, 0,cltFontSize));
           dataField3.setSize(cltFieldWidth, cltFieldHeight);
           dataField4.setFont(new java.awt.Font(cltFontName1, 0,cltFontSize));
           dataField4.setSize(cltFieldWidth, cltFieldHeight);
           dataField5.setFont(new java.awt.Font(cltFontName1, 0,cltFontSize));
           dataField5.setSize(cltFieldWidth, cltFieldHeight);
        }
        void textField1_actionPerformed(ActionEvent e) {
           cltFontSize =java.lang.Integer.parseInt(textField1.getText());
           updateFont();
        }

        void textField2_actionPerformed(ActionEvent e) {
           cltFieldWidth=java.lang.Integer.parseInt(textField2.getText());
           updateFont();
        }
      }
      --------end------

        Attachments

          Activity

            People

            • Assignee:
              dav Andrei Dmitriev (Inactive)
              Reporter:
              mkamito Masaaki Kamito (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: