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.
Except for the case that the JDK used is <5.0
I don't agree about use the JDK used is the correct approach. And if I wish to generate a form to use with JDK 1.4 but I am using JDK 5 in my development environment? Maybe the correct is use the JDK source target project property. Another thing to think is, how to manage it if the user change the JDK version < 5.0? The forms will be regenerated automatically or user need to open ALL the form manually? Think that tools exists to help us to be productive and not to create more problems than we already have. Regards.
So, I just opened javadoc for JFrame and I found getContentPane() method there... http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFrame.html#getContentPane() ... but maybe I just don't understand your troubles. Can you please add more info about yout issue? Please add simple steps to reproduce, sample code, ...
to jvagner: Pre 1.5 JDKs forced you to write JFrame.getContentPane().add(), JFrame.getContentPane().remove(), JFrame.getContentPane().setLayout(). Since JDK 1.5 it is possible to use simple JFrame.add(), JFrame.remove(), JFrame.setLayout().
I agree with hmichel that the right decision when to remove the getContentPane() prefix is not as simple as it seems at the first sight. On the other hand, it is a valid (low priority) request for enhancement that should be considered in the following releases.
to jstola: Oups, thanks for explanation.
Yes, I agree that this is a important thing to be implemented, we just decide how to proceed about things like that. Regards