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.
WTF! I cannot save my code. File>Save , Ctrl+S , the save icon, run command... I tried all of that but still, I can't save my code. There is an existing java code which I created using the form editor of netbeans 4.1 I opened it and edited it using netbeans 4.1. When I was saving the file, jaraaannn! WTF! I cannot save it! What I just did was to copy my source code, opened a text editor, pasted my source and save it. And my code was finally saved... but using another application. :(
Created attachment 21727 [details] the log file
reassigne to form for investigation, .. at least there is ClassCastException from form module ...
Interesting bug. Are you able to reproduce it? Have you edited some property of Dimension type?
I have figured out the cause of the problem. It's a human error. ....... There was an instance of a JPanel (jp1) I created using the form editor. And there was another instance of Jpanel (jp2) I created by hand-coding. At the code section of the properties window, I put a piece of code at the "Post-Init Code" field: jp1 = jp2; That was the only edition I made to my code using the form editor and the rest was adding code to the source. I think the problem was in the form editor when I assigned the jp1 to another object. Maybe, I did a foolishness assigning jp1 to jp2, but there should be an error report somewhere telling me the error, something like, "Operation not permitted! assigning a variable generated by the form editor to another object.". So that foolish like me will not do it again and this kind of error will be prevented. -------------------- I don't know if I'm correct.
This does not seem to be related. You can write anything into the "code" properties, it's on you to provide reasonable code. Form editor does not care about it, it is treated as a text string, so it cannot cause any problems in form editor if you write something "bad" here. You just may have problems when compiling or running the code. The problem that prevent you from saving the form is different. Accoridng to the exceptions found in the log, there was a bad value in some property of Dimension type - so some size like e.g. preferred size. Haven't you edited some? It is a bug that the bad value got there (code string used instead of real Dimension object), but it is not clear how it could happen. I'm not able to reproduce it. So closing this report as WORKSFORME. If you find a way we could reproduce the bug then please reopen this issue. Thanks.