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

paintComponent used one or many times with jre1.6.0_07 and jre1.6.016

XMLWordPrintable

    • 2d
    • generic, x86
    • generic, windows_vista

      FULL PRODUCT VERSION :
      java version "1.6.0_16"
      java (TM) SE Runtime environment (build 1.6.0_16-b01)
      Java HotSpot (TM) Client VM (build 14.2-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Vista edition familiale premium


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Intel(p)Core(TM)2 Quad CPU q 6600 @ 2,40GHz Fujitsu Siemens

      A DESCRIPTION OF THE PROBLEM :
      Below you will see the little program used to shown the problem with paintComponent(..).

      If I run this program with "jre1.6.0_16", paintComponent is runned two or three times.
      if I run this program with "jre1.6.0_07", paintcomponent is runned just one time. (That is good for my use).

      Is it possible to run paintComponent only one time under "jre1.6.0_16".

      I seems this modification is between "jre1.6.0_7" and "jre1.6.0_10".

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Let see the test program below only to run it

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Is it possible to run paintComponent only one time under "jre1.6.0_16".
      ACTUAL -
      Described above

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error message

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JFrame;

      public class Test
       {
        public static void main(String[] args)
         {
          JFrame Fenetre = new Fenetre();
         }
       }
      import javax.swing.JFrame;

      public class Fenetre extends JFrame
       {
        public Fenetre()
         {
          this.setTitle("Test");
          this.setSize(100, 150);
          this.setLocationRelativeTo(null);
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          this.setContentPane(new Panneau());
          this.setVisible(true);
         }
       }
      import javax.swing.JPanel;
      import java.awt.Graphics;

      public class Panneau extends JPanel
       {
        public void paintComponent(Graphics g)
         {
      System.out.println("Passage paintComponent");
      g.fillOval(20,20,75,75);
         }
       }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I am looking for one methode but without suiccess for instance

      Release Regression From : 6u7
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: