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.
The swing builder generates code that will not compile with Java 1.4. My environment is Java 1.5.0_02. The code the swing builder generates is: setLayout(new java.awt.GridBagLayout()); This is correct for 1.5 environments but it will not compile in 1.4 environments. The generated code MUST instead generate code like this: getContentPane().setLayout(new java.awt.GridBagLayout()); This ensures the generated code works in Java 1.4 and Java 1.5.
Re-assigning to form.
I am sorry I am not able to reproduce this issue. Could you, please, provide more details - steps to reproduce would be ideal. What class does your form extends (e.g. JPanel, JFrame, ...)? Why the class cannot be compiled on JDK 1.4?
Closing as invalid based on an e-mail from the reporter: > I retried JFrame, JDialog and NetBeans works perfectly. > I am a newbie with NetBeans and manually edited the .form. I must have done > this incorrectly as future edits from NetBeans always forgot getContentPane() > when calling setLayout(). So I blame me. Sorry for the noise.
Even invalid reports should have set correct Target Milestone.