Somebody has asked recently on of the mailling lists how to generate getters and setters in NetBeans. I've mentioned that some people even thought NetBeans doesn't have that functionality! So yes, it exists, only it's disguised as "Encapsulate Fields".

You can invoke the action either from the context menu in editor or from the main menu. In both cases use Refactor | Encapsulate Fields. The following dialog pops up and it lets you create getters and setters for all fields in the class:

The good news is that generating getters and setters will be available through the code completion in next release, which will make this feature much more discoverable:

Source: Roumen's Weblog

Parent Category: Other API Tips