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

Set contentPane to transparent will generate graphics paint problem.

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0
    • client-libs
    • None

      JDK: 1.2, 1.3
      OS: Solaris, Windows
      Locale: All

      According to JDK1.2's api specification, programmer can set JFrame's contentPane
      to transparent, using setOpaque(false). Then there will exists graphics painting
      problem. That is, if in eventDispatch thread, we change the location of one
      JComponent of the contentPane, the contentPane does not clear its previous
      invalid region that the JComponent occupied, but if the contentPane is opaque,
      it will use fillRect(getBackground()) to fill the previous invalid region.

      See attached program to show this problem.

      Run the attached program, press the button and see what will happen.


      jim.hu@prc 1999-08-05

            amfowler Anne Fowler (Inactive)
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: