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

Error in the paint method of JDialog

XMLWordPrintable

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

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP SP2

      A DESCRIPTION OF THE PROBLEM :
      I have found that the paint method does not work correctly under JAVA 1.5
      if you try to use it for drawing on the main panel (using getContentPane method).

      Please try this application I have developed to understand what I'm talking about. run the application under java 1.5 and java 1.4.2. Press on the middle button (ToolTipText: "how to win"). and see the difference between the two versions.
      http://amt4u.150m.com/AMTGame.jar

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Write a class that extends JDialog and use the paint method to draw something (pic as an example) on the main panel (use getContentPane method). in run-timme nothing is drawn!!

      Please try this application I have developed to understand what I'm talking about. run the application under java 1.5 and java 1.4.2. Press on the middle button (ToolTipText: "how to win") and then the exit button. See the difference between the two versions.
      http://amt4u.150m.com/AMTGame.jar


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      In generl, the paint should draw somthing on the main panel
      ACTUAL -
      nothing is dwan

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      no error

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      see this application
      http://amt4u.150m.com/AMTGame.jar

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: