JDK-7110890 : reg test TranslucentShapedFrameTest fails to create non-opaque frame
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version:
    7,8,9,10,11,11.0.6.0.60-oracle,12,13,14,15 7,8,9,10,11,11.0.6.0.60-oracle,12,13,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux_ubuntu
  • CPU: x86
  • Submitted: 2011-11-11
  • Updated: 2020-11-12
  • Resolved: 2020-10-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b21Fixed
Related Reports
Relates :  
Description
Steps to reproduce:

1. run TranslucentShapedFrameTest
2. enable "Non Opaque Frame" check box
3. click "Create Frame" button

The test should open non-opaque AWT Frame but it doesn't and throws

Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated
	at java.awt.Frame.setBackground(Frame.java:986)
	at TSFrame.createGui(TSFrame.java:260)
	...

Comments
Changeset: 6e8835c6 Author: Sergey Bylokhov <serb@openjdk.org> Date: 2020-10-19 23:54:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/6e8835c6
19-10-2020

solaris11.2-sparc/8u45b10(64bit) RULE java/awt/Window/TranslucentShapedFrameTest/TranslucentShapedFrameTest.java Exception java.lang.RuntimeException: has same issue.
06-03-2015

suggested fix resolving problem for: 1. run TranslucentShapedFrameTest 2. enable "Non Opaque Frame" check box 3. click "Create Frame" button and doesn't resolving problem for: 1. run TranslucentShapedFrameTest 2. change frame opacity 3. click on "create frame" need more fix
10-09-2013

test failed also if change frame opacity and then click on create frame
10-09-2013

----------System.out:(1/21)---------- applying TRANSLUCENT ----------System.err:(44/3196)---------- 2013-09-10 18:21:57.415 java[1889:4e07] Persistent UI failed to open file file://localhost/Users/gtee/Library/Saved%20Application%20State/net.java.openjdk.cmd.savedState/window_1.data: Permission denied (13) java.awt.IllegalComponentStateException: The frame is decorated at java.awt.Frame.setOpacity(Frame.java:960) at TSFrame.createGui(TSFrame.java:251) at TranslucentShapedFrameTest.createFrameBtnActionPerformed(TranslucentShapedFrameTest.java:279) at TranslucentShapedFrameTest.access$500(TranslucentShapedFrameTest.java:51) at TranslucentShapedFrameTest$6.actionPerformed(TranslucentShapedFrameTest.java:153) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:702) at java.awt.EventQueue$4.run(EventQueue.java:700) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
10-09-2013

solaris10-x64 7u14b10(64bit) It has same issue
22-01-2013

win7-x86 7u12b05(32bit) It has same issue.
17-01-2013

win7-x64 7u12b05(64bit) It has same issue.
28-12-2012

oel6.3-uek-x64 7u12b05(64bit) It has same issue.
26-12-2012

EVALUATION The suggested fix works on Windows.
14-11-2011

EVALUATION The problem is reproducible on Windows with JDK 8.
14-11-2011

SUGGESTED FIX diff -r ae731399e525 test/java/awt/Window/TranslucentShapedFrameTest/TSFrame.java --- a/test/java/awt/Window/TranslucentShapedFrameTest/TSFrame.java Tue Jun 07 22:58:24 2011 +0400 +++ b/test/java/awt/Window/TranslucentShapedFrameTest/TSFrame.java Fri Nov 11 16:30:11 2011 +0400 @@ -150,6 +150,7 @@ // c.setForeground(Color.red); // add(c); // c.setLocation(130, 130); + setUndecorated(true); } @Override public void paint(Graphics g) {
11-11-2011

EVALUATION There is a missed call to setUndecorated(true) in the test.
11-11-2011