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

REGRESSION: included test program slow under 1.4.x

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.2
    • client-libs
    • x86
    • windows_2000



      Name: gm110360 Date: 06/25/2003


      FULL PRODUCT VERSION :
      java version "1.4.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
      Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      the included test program draw three rectangles, partially
      overlapped. clicking on a rectangle brings it to front.
      it runs slowly under jdk 1.4.1 when ran as an applet (using
      appletviewer or internet explorer): after clicking on a
      rectangle the redraw isn't immediate, i have to wait for a
      few seconds.
      when ran as an application it runs faster: the redraw is
      immediate.
      using jdk 1.3.1 the redraw is always fast.
      this problem happes under windows. i have tried under linux,
      and it works correctly.


      REGRESSION. Last worked in version 1.3.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. install jdk 1.4.1 and integrate with internet explorer
      2. run the included program as an application
      3. run the included program as an applet

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;
      import java.awt.event.*;

      public class GraphApplet extends java.applet.Applet
      {
          private Panel[] panels;

          public void init()
          {
              createPanels();
              placePanels();
          }

          private void moveToFront(Panel p)
          {
              remove(p);
              add(p,0);
              validate();
          }

          private void createPanels()
          {
              final Color[] colors = new Color[]{Color.red, Color.yellow,Color.blue};

              panels = new Panel[colors.length];
              for (int i=0; i<colors.length; i++)
              {
                  final Panel p = new Panel();
                  String name = Integer.toString(i);

                  p.setSize(100,100);
                  p.setBackground(colors[i]);
                  p.addMouseListener(new MouseAdapter()
                      {
                          public void mouseClicked(MouseEvent e)
                          {
                              moveToFront(p);
                          }
                      });

                  p.add(new Label(name));
                  p.setName(name);

                  panels[i] = p;
              }
          }

          private void placePanels()
          {
              setLayout(null);
              for (int i=0; i<panels.length; i++)
              {
                  add(panels[i]);
                  panels[i].setLocation(30*i, 30*i);
              }
          }

          public static void main(String args[])
          {
              GraphApplet applet = new GraphApplet();

              final Frame f = new Frame();
              f.addWindowListener(new WindowAdapter()
                  {
                      public void windowClosing(WindowEvent e)
                      {
                          f.dispose();
                          System.exit(0);
                      }

                  });

              f.setSize(220,220);
              f.setLayout(new BorderLayout());
              f.add(BorderLayout.CENTER, applet);

              applet.init();
              applet.start();

              f.setVisible(true);
          }
      }


      ---------- END SOURCE ----------

      Release Regression From : mantis-beta
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 166950)
      ======================================================================

            bino Bino George
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: