Bug 23010 - swing: JFrame doesn't immediately notice property changes in its ContentPane
Summary: swing: JFrame doesn't immediately notice property changes in its ContentPane
Status: RESOLVED INVALID
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Anthony Balkissoon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 14:34 UTC by from-classpath
Modified: 2005-09-15 18:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-08-21 04:48:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description from-classpath 2005-06-24 14:34:06 UTC
Steps to reproduce:
1. Compile and run the attached testcase.

Expected results:
1. A window with "title1" shows  up. Window contains a JInternalFrame with maximize icon, "title2", iconify icon, another maximize icon and close icon all on the same horizontal line.

Actual results:
1. A window with "title1" shows up. Window contains a JInternalFrame but maximize icon is about 20 pixels below the actual title bar the JInternalFrame. "title2" and other icons are  about 300 pixels below the title bar. If you resize the JFrame you will see that "title2" is actually always in the middle of the JInternalFrame.

Testcase:
import java.awt.*;
import javax.swing.*;
public class testcase extends JFrame {
        public static void main(String[] args) {
                new testcase().show();
        }
        public testcase() {
                super("title1");
                JInternalFrame frame = new JInternalFrame("title2", true, true, true, true);
                this.setContentPane(frame);
                frame.show();
                this.setSize(new Dimension(600, 600));
        }
}
Comment 1 from-classpath 2005-07-05 19:07:53 UTC
This is probably a duplicate of bug #13530
Comment 2 Thomas Fitzsimmons 2005-08-21 04:48:49 UTC
This test case exposes several more bugs in the JInternalFrame implementation. 
Minimizing the internal frame hangs the application and the close button doesn't
work.  Also, the minimize, maximize, close and window control buttons don't have
any icons on them.  Reassigning to Roman.
Comment 3 Anthony Balkissoon 2005-09-15 18:36:31 UTC
This is not a JInternalFrame bug.  Using a JButton instead of a JInternalFrame
produces the same (undesirable) results.  Hiding/Disposing of the JButton
(programmatically) is not immediately shown on screen.  The JFrame must be
resized (and in fact made larger) for the changes to show up.  This is the case
when JInternalFrame is used (instead of JButton) too.

Also, the original bug that was reported here is no longer valid, it has been
fixed.  I'm closing this bug and opening one relating to JFrame's handling of
property changes in its ContentPane.