Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4464710
Votes 2
Synopsis Undecorated Frames cannot be shown initially iconified
Category java:classes_awt
Reported Against merlin-beta
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 31-MAY-2001
Description




java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

Undecorated frames cannot be programmatically iconified _before_
being shown. The code that follows shows that although the
frame is first iconified then shown, it gets shown in normal
  state. Notice that everything works fine if the frame is
decorated.
The workaround is to first show the undecorated frame, then
programmatically iconify it.

//--------------------------------------------
import javax.swing.*;

public class Undec extends JFrame
{
 public static void main(String args[])
 {
  new Undec();
 }

 public Undec()
 {
  setBounds(100, 100, 400, 250);
  setDefaultCloseOperation(EXIT_ON_CLOSE);
  setUndecorated(true);
  setState(ICONIFIED);
  show();
 }
}
//--------------------------------------------
(Review ID: 125291) 
======================================================================
Work Around




//--------------------------------------------
import javax.swing.*;

public class Undec extends JFrame
{
 public static void main(String args[])
 {
  new Undec();
 }

 public Undec()
 {
  setBounds(100, 100, 400, 250);
  setDefaultCloseOperation(EXIT_ON_CLOSE);
  setUndecorated(true);
  show();
  setState(ICONIFIED);
 }
}
//--------------------------------------------
======================================================================
Evaluation



 xxxxx@xxxxx   2002-08-26

Submitter doesn't specify what window manager he uses.  I can only
reproduce it under OpenLook, but under OpenLook undecorated frames are
implemented via OverrideRedirect and so are completely out of WM
control.  Since description says that programmatic iconification works
later on, I assume he's not using OpenLook.

I can reproduce this bug with Merlin b60 under CDE.  Interestingly,
same test under b60 works fine under fvwm.  b70 (earliest > b65 that I
can find around) and onward are fine under CDE as well.

Propose to close as not reproducible.

======================================================================

| The problem is that when native object for the frame peer is created,
| we don't record the frame state and rely on Windows to deliver WM_SIZE
| message with proper state.  This message is not sent to popup windows
| (that undecorated frames are implemented with).  The fix is to record
| the target state when the native object is created.  This also avoid
| sending a false WINDOW_ICONIFIED event to the frame that is created
| iconic.
|
| 4464714 is the same problem but for frames that are created initially
| maximized.

 xxxxx@xxxxx  2002-09-03
Comments
  
  Include a link with my name & email   

Submitted On 20-SEP-2002
fabiocar
Hey, the bug is for Windows !!!



PLEASE NOTE: JDK6 is formerly known as Project Mustang