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.
Select a local variable where it is declared: e.g. Button button = new Button(); // <-- select 'button' Go to the Refactor menu and select Introduce->Field... A dialog appears stating "Invalid Selection". This is counter intuitive and should be corrected. The obvious expectation of the user is that they wish to make the local variable a field variable.
I also can't find any mention of the 'Introduce Field' refactoring in the documentation. Searching the help for "refactor introduce field" produces many results, none of which appear to have anything to do with this refactoring. I simply don't know how to use this refactoring because it doesn't do what I expect and I can't find out how it is supposed to be used.
After reading this http://docs.oracle.com/cd/E50453_01/doc.80/e50452/build_japps.htm#NBDAG592 I tried selecting the entire statement and it worked. I don't think that is very intuitive, as it is only the variable that is relevant, not the initialization.