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

Showing a transparent stage throws exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • fx1.2
    • fx1.2
    • javafx
    • Windows XP Prof, marina b05

      This is reproducible with marina b05.

      I'm running the below program to show a transparent Stage.

      import javafx.stage.*;
      import javafx.scene.*;
      import javafx.scene.shape.*;
      import javafx.scene.paint.*;

      Stage {
          style: StageStyle.TRANSPARENT
          scene: Scene {
              fill: Color.TRANSPARENT
              content: Rectangle {
                  x: 30
                  y: 30
                  width: 50
                  height: 60
                  fill: Color.BLUE
              }
          }
      }

      It throws the below exception and shows up as an undecorated Stage.

      Error setting window transparency using AWTUtilities
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.javafx.tk.swing.WindowImpl.setWindowTransparency(WindowImpl.java:199)
      at com.sun.javafx.tk.swing.WindowStage.initializeStyle(WindowStage.java:142)
      at com.sun.javafx.tk.swing.FrameStage.initializeStyle(FrameStage.java:74)
      at com.sun.javafx.tk.swing.WindowStage.<init>(WindowStage.java:80)
      at com.sun.javafx.tk.swing.FrameStage.<init>(FrameStage.java:51)
      at com.sun.javafx.tk.swing.SwingToolkit.createTKStage$impl(SwingToolkit.fx:118)
      at com.sun.javafx.tk.swing.SwingToolkit.createTKStage(SwingToolkit.fx:71)
      at javafx.stage.Stage.applyDefaults$javafx$stage$Stage$impl_peer(Stage.fx:109)
      at javafx.stage.Stage.initialize$(Stage.fx:108)
      at Test.javafx$run$(Test.fx:6)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:66)
      at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run$impl(SwingToolkit.fx:754)
      at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:707)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      Caused by: java.lang.IllegalArgumentException: The effects for decorated windows are not supported.
      at com.sun.awt.AWTUtilities.setWindowOpaque(AWTUtilities.java:388)
      ... 29 more

            psomashe Parvathi Somashekar (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: