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

UI of Java Web Start app isn't updated when changing Windows theme

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 7u51, 8, 9
    • client-libs
    • b124
    • x86, x86_64
    • windows_7

      Java Web Start app has at least two Event Dispatch Threads: for Java Console and for application itself, each associated with its own AppContext.
      When user changes Windows themes (from Basic to Classic), updateAllUIs() is posted to EDT. It is done in DesktopProperty.updateUI(). Since DesktopProperty.updatePending flag is shared between EDT, only one updateAllUIs() event will be posted, thus UI will updated only in one of the EDTs.

      Here's debug prints:
      WToolkit.windowsSettingChange - directly
      xpStyleEnabled = false
      >>> WToolkit.updateProperties
      scheduleUpdateUI:false - AWT-EventQueue-1
      Scheduling UI update - AWT-EventQueue-1
      scheduleUpdateUI:true - AWT-EventQueue-2

      It looks as if DesktopProperty.updatePending flag should be part of AppContext.

      My build includes the fixes for JDK-8042590 and JDK-8039383. Yet the issue is reproduced without those fixes.

      Steps to reproduce:
      1. Enable Java Console in Java Control Panel:
        - Click Advanced tab,
        - Select Show Console,
        - Click OK to apply the changes and close JCP.
      2. Start any javaws app that uses Windows Look-and-Feel or which allows changing LaF. (I used SwingSet3.)
      3. Change Windows theme from visual styles-enabled (Aero or Basic) to Classic one.
      4. You will see the UI correctly updated either in Java Console or in the application.

            ssadetsky Semyon Sadetsky (Inactive)
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: