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

When Jpanel draws a rectangle, the repainting does not redraw properly the picture

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P4 P4
    • None
    • 6
    • client-libs

      J2SE Version (please include all output from java -version flag):
        java version "1.6.0-beta2"
        Java(TM) SE Runtime Environment (build 1.6.0-beta2-b80)
        Java HotSpot(TM) Client VM (build 1.6.0-beta2-b80, mixed mode, sharing)

      Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
        NO

      Operating System Configuration Information (be specific):
        Windows XP Professional SP2

      Hardware Configuration Information (be specific):
        Intel Pentium III, 730 Mhz, 384 Mb RAM

      Bug Description:
        A swing application contains a Jpanel that draws a rectangle and registers mouse
        listeners that allow to drag it. When moving the rectangle, a repaint with a clipping
        box is performed. The bug is that the repainting does not redraw properly the picture.

      Steps to Reproduce (be specific):
        Consider the attached program. Compile, and run it. Then place the pointer over the
      rectangle, press the left mouse button and drag it upwards. You should see an outlined
      rectangle moving above a red one that is not painted properly. If instead you drag it
      downwards, the red one is repainted correctly.

      Note that in order to make sure that the clipping area encloses what gets changed on
      the screen, i.e. the box containing the outline present on the screen and the new one
      to be drawn, including the pen stroke, it has been widened by one pixel in all directions.
      This problem does not occur with release 5.

      Platform configuration:

      CPU:
      Intel 32bit
      Single Processor
      Processor Speed: 730 MHz

      Operating System:
      Windows XP (version 5.1 Service Pack 2 (Build 2600))

      Font Smoothing: Enabled
        Font Smoothing Type: On/Standard

      DirectX version: DirectX 8.1 or greater

      DirectX display devices:
      Device 0:
        Resolution (width x height x depth): 1024 x 768 x 24
        Device driver i81xdnt5.dll version 6.13.1.3198

      GDI display devices:
      Primary: Name = \\.\DISPLAY1, Description = Intel(R) 82815 Graphics
      Controller (Microsoft Corporation)

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: