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

Splash screen replace SwingSet demo panel in SwingSet2 due to race condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.0
    • client-libs
    • Fix Understood
    • x86
    • windows_nt

      In the SwingSet2 applet demo that is under demo/jfc/SwingSet2, the demo first shows splash screen using the SwingUtilities.invokeLater(). Then the demo tries to load the entire SwingSet demo using the SwingUtilities.invokeLater() and DemoLoaderThread. However, from time to time, the showSplashScreen() call may be executed after the SwingSet demo has been added to the panel. Thus, the splash screen will be added to the panel and replace the original SwingSet demo.

      To reproduce it, using Java Plug-in 1.4 in latest Merlin build, and run SwingSet2Plugin.html. First time, it should work because the loading of the classes/jars didn't trigger the race condition. However, when the page is switched back-and-forth, the race condition will occur, and the splash screen is seen in the center of the applet, and the swingset demo is not shown.

      This race condition has been in the demo since 1.3, but it is not triggered until recent changes in Java Plug-in that triggers the bug in the demo.

      To fix this, simply call SwingUtilities.invokeAndWait() for showSplashScreen().

            Unassigned Unassigned
            stanleyh Stanley Ho (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: