Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
JDK 7u4: java.awt.IllegalComponentStateException: The dialog is decorated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JDK 7u4: java.awt.IllegalComponentStateException: The dialog is decorated

I'm trying to upgrade to JDK 7u4 and I've found a first problem with Quaqua 8.0:

[INFO] java.awt.IllegalComponentStateException: The dialog is decorated
[INFO] 	at java.awt.Dialog.setOpacity(
[INFO] 	at java.awt.Window$1.setOpacity(
[INFO] 	at com.sun.awt.AWTUtilities.setWindowOpacity(
[INFO] at sun.lwawt.macosx.CPlatformWindow$3.applyProperty( [INFO] at sun.lwawt.macosx.CPlatformWindow$3.applyProperty( [INFO] at [INFO] at [INFO] at [INFO] at java.beans.PropertyChangeSupport.firePropertyChange( [INFO] at java.beans.PropertyChangeSupport.firePropertyChange(
[INFO] 	at java.awt.Component.firePropertyChange(
[INFO] 	at javax.swing.JComponent.putClientProperty(
[INFO] at ch.randelshofer.quaqua.QuaquaUtilities.setWindowAlpha(
[INFO] 	at ch.randelshofer.quaqua.JSheet.addNotify(
[INFO] 	at java.awt.Window.pack(
[INFO] 	at ch.randelshofer.quaqua.JSheet.showSheet(
[INFO] 	at ch.randelshofer.quaqua.JSheet.showSaveSheet(

The relevant code is:

707     /**
708 * Uses some unsupported (dangerous) API calls on the native peers to make 709 * a window translucent. If the API is not found, this method leaves the
 710      * window opaque.
 711      *
 712      * @param w The Window.
 713      * @param value The alpha channel for the window.
 714      */
 715     static void setWindowAlpha(Window w, int value) {
 716         if (w == null) {
 717             return;
 718         }
 721         if (w instanceof RootPaneContainer) {
 722             JRootPane rp = ((RootPaneContainer) w).getRootPane();
 724             // Window alpha is for J2SE 5 on Mac OS X 10.5
725 // See: 726 rp.putClientProperty("Window.alpha", new Float(value / 255f));
 728         }
 729     }

 302     @Override
 303     public void addNotify() {
 304         super.addNotify();
305 if (UIManager.getBoolean("Sheet.showAsSheet") && !isExperimentalSheet()) {
 306             QuaquaUtilities.setWindowAlpha(this, 240);
 307         }
 308     }

It seems that it tries to set a client property defined since Java 5, that was working with Java 6 and it's no more available (for decorated windows?) in JDK 7u4. Or is it called too late (during addNotify())?

* Caveats: We are using an unsupported API call to make the JSheet translucent. * This API may go away in future versions of the Macintosh Runtime for Java.
 * In such a case, we (hopefully) just end up with a non-opaque sheet.

I've filed it as . I suppose the best thing is to disable the offending call for JDK 7u4, but I'd like to hear some opinion here.


Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
email@hidden -
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.