I Need to know how to have NetBeans generate getters and setters using a shortcut.
Asked
Active
Viewed 1.6e+01k times
80

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632

Zvjezdan
- 931
- 1
- 6
- 5
-
1https://netbeans.org/kb/docs/java/editor-codereference.html#generatecode – Jan 12 '14 at 12:14
-
14i dont want to use google, i am here to ask and you should not read my questions in future. Bye Sharma – Zvjezdan Jan 12 '14 at 12:53
-
possible duplicate of [NetBeans Tips and Tricks](http://stackoverflow.com/questions/628830/netbeans-tips-and-tricks) – codingenious Jan 12 '14 at 13:19
-
@Zvjezdan Have a look at http://meta.stackexchange.com/questions/182266/how-much-research-effort-is-expected-of-stack-overflow-users, Saurabh isn't the only one that would rather you google for it first. – Dennis Meng Jan 15 '14 at 04:30
-
5@DennisMeng I googled it, and guess what I found? This. – William Oliver Feb 04 '16 at 18:23
-
@WilliamOliver Good, you're searching. – Dennis Meng Feb 05 '16 at 02:11
1 Answers
182
Position the cursor inside the class, then press ALT + Ins and select Getters and Setters
from the contextual menu.

Stefano Sanfilippo
- 32,265
- 7
- 79
- 80
-
34
-
2doesn't work (setters )with SimpleStringProperty, tested on netbeans 8.1 – Towfik Alrazihi Nov 08 '16 at 15:10
-
9In my case (Netbeans 8.2, Eclipse keymap config) it's CTRL+ALT+SHIFT+e ("Encapsulate Fields) – Aydin K. May 31 '17 at 18:56
-
For me as well in 8.2 Alt + e did not worked .CTRL+ALT+SHIFT+e worked fine Thanks @AydinK. – prasad kp Dec 16 '17 at 05:49