Usually newbies think that Netbeans does not provide the functionality of generating code for setters/getters. But it exists in the name of Encapsulate Fields.


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