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 Jframe it is not posible to use Property editor to set defaultCloseOperation to EXIT_ON_CLOSE.
Confirming. There is a security exception... org.netbeans.ExitSecurityException: Illegal attempt to exit early at org.netbeans.TopSecurityManager.checkExitImpl(TopSecurityManager.java:118) at org.netbeans.TopSecurityManager$PrivilegedCheck.run(TopSecurityManager.java:450) at java.security.AccessController.doPrivileged(Native Method) at org.netbeans.TopSecurityManager$PrivilegedCheck.check(TopSecurityManager.java:475) at org.netbeans.TopSecurityManager$PrivilegedCheck.checkExit(TopSecurityManager.java:463) at org.netbeans.TopSecurityManager.checkExit(TopSecurityManager.java:101) at javax.swing.JFrame.setDefaultCloseOperation(JFrame.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.netbeans.modules.form.RADProperty.setTargetValue(RADProperty.java:101) ...
Looks like the problem appears with jdk 1.4.1, but not with 1.4.0.
It also happens with jdk 1.4.2 beta
http://javadiff.sourceforge.net/jdiff/reports/j2se140_j2se141_docs/changes/docdiffs_javax.swing.html#javax.swing.JFrame.dmethod.setDefaultCloseOperation(int) Issue #20751 made the NetBeans JVM reject the security permission for VM exit, which JFrame requests as of 1.4.1 for this property. The form editor must not actually attempt to set the property JFrame.defaultCloseOperation, at least not to EXIT_ON_CLOSE. Generate code for it, but don't call it at design time.
Thanks for finding this out. Another "nice" hack to be put to form editor...
I don't think that subcomponent "graphics" is the right one...
Fixed.
It is fixed now, but another problem appears - see newly added issue #40458.