Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      windows 7 x64
      Java 1.6.0.21

      Description

      I remark a blinking effect when I resize window on TextPaneDemo when the cursor (focus) is in TextPane component and this blinking effect disappears if the focus is on a other component.

      Duto

        Activity

        Hide
        Greg Brown added a comment -

        I'm not sure I understand the problem. The text pane should only show a blinking caret when it has the focus. If another component has the focus, the text pane will lose its focus state and stop showing the caret.

        Can you provide some specific steps to reproduce this issue?

        Show
        Greg Brown added a comment - I'm not sure I understand the problem. The text pane should only show a blinking caret when it has the focus. If another component has the focus, the text pane will lose its focus state and stop showing the caret. Can you provide some specific steps to reproduce this issue?
        Hide
        Duto added a comment -

        In fact when I resize the window of the TextPaneDemo, if the TextPane have the focus they are a blinking effect on window, but they don't have this problem if the focus is a other component. Sorry for my bad english :s

        Show
        Duto added a comment - In fact when I resize the window of the TextPaneDemo, if the TextPane have the focus they are a blinking effect on window, but they don't have this problem if the focus is a other component. Sorry for my bad english :s
        Hide
        Greg Brown added a comment -

        Are you saying that you see an unexpected flicker effect in the window when you resize?

        Show
        Greg Brown added a comment - Are you saying that you see an unexpected flicker effect in the window when you resize?
        Hide
        Duto added a comment -

        Yes it's flicker efffect on window

        Show
        Duto added a comment - Yes it's flicker efffect on window
        Hide
        Greg Brown added a comment -

        Are you using Pivot 2.0? If so, try commenting out the call to paintVolatileBuffered() on line 393 of ApplicationContext (but not the call to paintBuffered()):

        // if (!paintVolatileBuffered((Graphics2D)graphics)) {
        if (!paintBuffered((Graphics2D)graphics))

        { paintDisplay((Graphics2D)graphics); }

        // }

        I.e. bypass the volatile image and just use a regular buffered image. Let me know if that works.

        Show
        Greg Brown added a comment - Are you using Pivot 2.0? If so, try commenting out the call to paintVolatileBuffered() on line 393 of ApplicationContext (but not the call to paintBuffered()): // if (!paintVolatileBuffered((Graphics2D)graphics)) { if (!paintBuffered((Graphics2D)graphics)) { paintDisplay((Graphics2D)graphics); } // } I.e. bypass the volatile image and just use a regular buffered image. Let me know if that works.
        Hide
        Duto added a comment -

        Yes I use 2.0 with last revision: 996322

        I modify the source of ApplicationContext to comment lines 393 and 397. I rebuild the package and restart the TextPaneDemo, and I get always the same problem, That's no solve the problem.

        Show
        Duto added a comment - Yes I use 2.0 with last revision: 996322 I modify the source of ApplicationContext to comment lines 393 and 397. I rebuild the package and restart the TextPaneDemo, and I get always the same problem, That's no solve the problem.
        Hide
        Greg Brown added a comment -

        OK, that is good to know. Can you provide a list of the specific steps you execute to produce the problem? Also, what OS/Java version are you using?

        Show
        Greg Brown added a comment - OK, that is good to know. Can you provide a list of the specific steps you execute to produce the problem? Also, what OS/Java version are you using?
        Hide
        Duto added a comment - - edited

        Os :
        Windows 7 x64
        java :
        Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
        Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)

        I start the application TextPaneDemo, set focus to TextPane and when I resize the window I have a flicker effect. If I set the focus on a other component and resize the window I don't have the flicker effect.

        Greg you can't reproduce this problem on your system ?

        Show
        Duto added a comment - - edited Os : Windows 7 x64 java : Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode) I start the application TextPaneDemo, set focus to TextPane and when I resize the window I have a flicker effect. If I set the focus on a other component and resize the window I don't have the flicker effect. Greg you can't reproduce this problem on your system ?
        Hide
        Greg Brown added a comment -

        No, I don't see this issue on my system (Mac OS X 10.6.4, JDK 1.6.0_20). Unfortunately I don't currently have a Windows 7 installation I can test on, so any additional information you can provide would be helpful.

        Show
        Greg Brown added a comment - No, I don't see this issue on my system (Mac OS X 10.6.4, JDK 1.6.0_20). Unfortunately I don't currently have a Windows 7 installation I can test on, so any additional information you can provide would be helpful.
        Hide
        Duto added a comment - - edited

        I make some test on differents systems it's very strange :s

        I test on

        • window 7 64bits (on my staff) with a jdk1.6.0.21 x64 with no problem
        • Window xp sp3 32 bits (virtual machine) with jdk 1.6.0.18 with no problem

        I seem to be my home computer have only this problem. I investigate tonight ...

        Show
        Duto added a comment - - edited I make some test on differents systems it's very strange :s I test on window 7 64bits (on my staff) with a jdk1.6.0.21 x64 with no problem Window xp sp3 32 bits (virtual machine) with jdk 1.6.0.18 with no problem I seem to be my home computer have only this problem. I investigate tonight ...
        Hide
        Duto added a comment - - edited

        Oki I found a solution :

        I add "-Dsun.java2d.noddraw=true" to my VM parameter and that's work perfectly with no flicker.

        I found some informations about that :

        "In Windows, in Swing, you will see the entire screen repaint from time to time for no apparent reason, causing an annoying flicker. This is due to the fact that Swing uses DirectDraw for rendering which periodically redraws just to be safe. You can turn off DirectDraw and use standard Windows GDI rendering by starting

        Java.exe -Dsun.java2d.noddraw=true MyClass

        This will slightly slow down painting, however."

        You could found more information on this page :

        http://java.sun.com/products/java-media/2D/perf_graphics.html

        ++

        Show
        Duto added a comment - - edited Oki I found a solution : I add "-Dsun.java2d.noddraw=true" to my VM parameter and that's work perfectly with no flicker. I found some informations about that : "In Windows, in Swing, you will see the entire screen repaint from time to time for no apparent reason, causing an annoying flicker. This is due to the fact that Swing uses DirectDraw for rendering which periodically redraws just to be safe. You can turn off DirectDraw and use standard Windows GDI rendering by starting Java.exe -Dsun.java2d.noddraw=true MyClass This will slightly slow down painting, however." You could found more information on this page : http://java.sun.com/products/java-media/2D/perf_graphics.html ++
        Hide
        Greg Brown added a comment -

        To fix another bug, I recently made a change to the text input and text area skins that queues a repaint callback rather than repainting the caret immediately. If you sync with the latest 2.0 code, do you still see this problem without the VM parameter?

        Show
        Greg Brown added a comment - To fix another bug, I recently made a change to the text input and text area skins that queues a repaint callback rather than repainting the caret immediately. If you sync with the latest 2.0 code, do you still see this problem without the VM parameter?
        Hide
        Duto added a comment - - edited

        Your are the best, that works perfectly (no flicker) without the parameter !!!

        thx

        Show
        Duto added a comment - - edited Your are the best, that works perfectly (no flicker) without the parameter !!! thx
        Hide
        Greg Brown added a comment -

        This was indirectly fixed by another change that queues a repaint callback rather than repainting immediately.

        Show
        Greg Brown added a comment - This was indirectly fixed by another change that queues a repaint callback rather than repainting immediately.
        Hide
        Duto added a comment -

        I remark that with color chooser (from the Kitchen demo) I have the flicker too when I resize the window, if a add -Dsun.java2d.noddraw=true on th vm parameter the flicker disappears

        Show
        Duto added a comment - I remark that with color chooser (from the Kitchen demo) I have the flicker too when I resize the window, if a add -Dsun.java2d.noddraw=true on th vm parameter the flicker disappears
        Hide
        Greg Brown added a comment -

        Can you verify that you are still seeing this problem with the latest build? We're currently tracking some issues with ColorChooser in PIVOT-390:

        https://issues.apache.org/jira/browse/PIVOT-390

        Let's add additional information to that ticket.

        Show
        Greg Brown added a comment - Can you verify that you are still seeing this problem with the latest build? We're currently tracking some issues with ColorChooser in PIVOT-390 : https://issues.apache.org/jira/browse/PIVOT-390 Let's add additional information to that ticket.

          People

          • Assignee:
            Unassigned
            Reporter:
            Duto
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development