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.
Test following: -) Create a new JPanel -) Add a JTextField -) Rename the JTextField1 to JTextFieldX (at Navigator) -> JPanel is collapsed
I tried to create a new JPanel form, insert JTextField, select jTextField1 in Navigator, invoke Change Variable Name action, enter 'jTextFieldx', press OK, but I don't see anything suspicious/collapsed. Could you, please, provide more details. It would help to emphasize the difference between the actual and expected behavior and maybe even attach a screenshot showing the problem. Thank you in advance.
Created attachment 118334 [details] I have recorded a sreenvideo
Thank you for the video. Now I can see what happens on your machine. Unfortunately, I am still not able to reproduce this behavior on my machine. Does it happen every time you try it or sometimes only (it may be some race condition)? The severity of this issue seems to be pretty slow, but if you think that it is worth the effort, you may try to figure out more about when exactly it happens: JDK 6 versus JDK 7, various look and feels, NB builds, etc. I am not able to do anything until I am able to reproduce this problem locally and this kind of information may help me in reproduction.
(In reply to comment #3) > Thank you for the video. Now I can see what happens on your machine. I use JDK1.7u3 on Win7x64 and the NB7.1.2 Version: Product Version: NetBeans IDE 7.1.2 (Build 201204101705) Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) > Does it happen every time you try it or sometimes only (it may be some race condition)? It´s always reproduceable. I´ve also tried JDK1.6u31 -> Same result.
*** Bug 208066 has been marked as a duplicate of this bug. ***
Very strange: I´ve changed my User-Dir to a non existing directory and then it worked. Then I change every setting at Options/Miscellaneous/GUI-Builder to the same options (as my default-config) and it worked still as expected. What can I check else?
Can you still reproduce it with your original user dir? If yes, than make a back up of it, and start experimenting with deleting parts of it. Do it always when the IDE is shut down, then start it again. First you may try to delete dirs under 'config', e.g. 'preferences'. This way you can find out if some IDE setting influences the wrong behavior. If it is the case, there is a chance someone else can reproduce it and fix. Also try to delete the entire 'var' directory under the user dir. If this has an effect, then it means the cause is in some cached data. In such case the chance to diagnose which cache is broken and why is rather low, I'm afraid.
It´s a problem of the project. I´ll upload the two projects.
Created attachment 118394 [details] This project works as expected (JPanel isn´t collapsed).
Created attachment 118395 [details] At this project the JPanel is always collapsed.
Thank you for the additional information. I am able to reproduce this issue now. In fact, this behavior is not project-related. The important aspect is whether the renamed component is private or protected. When the corresponding field is protected then GUI Builder starts the refactoring infrastructure and reloads the form once the refactoring is finished. There is no way to keep the set of expanded/collapsed branched in Navigator when the form is reloaded (i.e., closed and reopened). Hence, the only way to fix this issue is avoidance of the reload. Unfortunately, we cannot skip reload in general. It is important for many refactorings. We may try to identify some cases when the reload is not necessary but it is probably not worth the effort (it is error-prone and the benefit is not worth the risk).
*** Bug 212503 has been marked as a duplicate of this bug. ***
Resolved? Won't fix? How ridicuolous!