This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
For your JInternalFrames such as the ones showing the source code, you must not simply store the current window size, but also other size depending on if window is maximized or iconified. If you do not during the next session the windows will have to be manually resized as opposed to just hitting the restore button. In other words; You need both of these when you store window state plain = java.awt.Component.getBounds() rest = javax.swing.JInternalFrame.getNormalBounds(); And if the window was saved while maximized, when ide next starts set jif.setBounds(restX,restY, restWidth,restHeight); jif.setMaximum(true); If the window was saved while iconified, when ide next starts set jif.setBounds(restX,restY, restWidth,restHeight); jif.setIcon(true); If the window was saved while not iconified or maximized jif.setBounds(plainx,plainy, plainwidth,plainheight); You might say lets just skip getBounds() all together and always use getNormalBounds. but getNormalBounds never has a value until either iconify or maximize has been called at least once, otherwise I believe it is either null, or 0. Truthfully normal bounds should be set when the window is first created to equal the initial window size (Sun's job). But since this is not happening, you must use both normalBounds and bounds.
NOTE: THIS IS FINE WITH THE SOURCE WINDOW. IT IS THE MAIN IDE WINDOW THAT HAS THIS PROBLEM. So obviously my detailed explanation is not necessary. Just needs to apply source window technique to IDE window. Noting that IDE window is not a JInternalFrame, /me wonders if this is another level of issue alltogether... 3.4.1.beta1 How-To: 1. hit 'restore' for the window and set a nice size. 2. hit 'maximize' for window. 3. shut down IDE. 4. Restart IDE. 5. Hit 'restore' on window. window should shrink down to size you set before.
Actually the maximized state of the IDE at shutdown is not re-applied at powerup.
It is known problem. The problem is that it is not possible to detect/programmaticaly maximize main window (javax.swing.JFrame) in JDK 1.3. There is already some support for it in JDK 1.4 but it does not work correctly. See issue #26598. *** This issue has been marked as a duplicate of 26598 ***
Your information is correct. However, this is not a duplicate of 26598 as far as I can see. Oh, nevermind. It is more than 26598 and this issue are both based on the same root problem, no maximize state information. Even if their hack-solutions require different techniques? Actually the proper hack would be to hack in a maximized state detection mechanism. Then I could see these being duplicate.
Yes you are right. There is already code in NB to save maximized state on JDK 1.4 but it does not work. (eg. on Linux, RH 7.1, KDE 2.1.1 when I call getExtendedState() after I maximize main window using maximize button it returns 4 intstead of 6 (MAXIMIZED_BOTH, VERT, HORIZ). When I call setExtendedState() window is maximized only verticaly. I can provide you with simple test app if you want.) Anyway fix of issue #26598 should give common solution if possible both for JDK 1.3 and JDK 1.4.
verified, closed - it's duplicate.
*** This issue has been marked as a duplicate of 26598 ***