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)); } }
This is probably a duplicate of bug #13530
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.
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.