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

REGRESSION: repaint(1000) incorrectly repaints immediately

    XMLWordPrintable

Details

    • x86
    • windows_98, windows_xp

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.0.2"
        ----------
        java version "1.1.7B"
        ----------
        java version "1.3.0_01"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
        Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
        ----------
        java version "1.4.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
        Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)



        FULL OPERATING SYSTEM VERSION :

        Windows 98 [Version 4.10.2222]

        A DESCRIPTION OF THE PROBLEM :
        A 'repaint(1000)' should cause a repaint to happen around
        one second later. Java 1.4 incorrectly repaints
        immediately.

        The sample app, when run under 1.0/1.1/1.3 works
        correctly. When run under 1.4, the bug occurs.

        REGRESSION. Last worked in version 1.3

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Run the sample app under Java 1.4


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        expect: The number in the display should increment
        approximately once a second.

        actual: Under 1.4, the display updates as fast as it can
        (no one second wait).

        This bug can be reproduced always.

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

        public class repaint extends Frame {
            private int m_times;
            public static void main(String[] args) {
                new repaint();
                }
            public repaint() {
                super("Repaint Bug");
                resize(400,300);
                show();
                }
            public boolean handleEvent( Event evt ) {
                if (evt.id==Event.WINDOW_DESTROY) {
                    System.exit(0);
                    }
                return super.handleEvent(evt);
                }
            public void paint(Graphics g) {
                g.drawString( ""+m_times++, size().width/2, size().height/2 );
                repaint(1000);
                }
            }

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

        Release Regression From : 1.3.1
        The above release value was the last known release where this
        bug was known to work. Since then there has been a regression.
        ###@###.### 2004-11-15 20:22:20 GMT

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                gmanwanisunw Girish Manwani (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Imported:
                  Indexed: