2014-01-12 77 views
45

我需要知道如何讓NetBeans使用快捷方式生成getter和setter。在NetBeans中生成getter和setter

+1

https://netbeans.org/kb/docs/java/editor-codereference.html#generatecode –

+11

我不想使用谷歌,我在這裏問,你不應該在將來閱讀我的問題。再見Sharma – Zvjezdan

+0

[NetBeans提示和技巧]的可能重複(http://stackoverflow.com/questions/628830/netbeans-tips-and-tricks) – Batty

回答

110

位置的類內的光標,然後按ALT + 並從上下文菜單中選擇Getters and Setters

+16

對於MAC用戶,它的ctr +我https://netbeans.org/kb/articles/mac.html – Oyeme

+2

不工作(setter)與SimpleStringProperty,在NetBeans 8.1上測試 –

+2

在我的情況(Netbeans 8.2,Eclipse鍵盤配置)它是CTRL + ALT + SHIFT + e(「封裝字段」) –