How to generate getters and setters in Netbeans?

1,014 views
Skip to first unread message

krishnas

unread,
Apr 13, 2007, 12:22:53 AM4/13/07
to bojug

Hello Friends,

How to generate getters and setters in netbeans ide?
I have used Eclipse earlier, it has option to generate methods once
you define the properties.
Is there any option available in NetBeans 5.5

NetBeans 5.5 looks better than eclipse. :)

Thanks,
Krishna

Manish Gupta

unread,
Apr 13, 2007, 12:36:14 AM4/13/07
to bo...@googlegroups.com
I want to add more on this..I am also looking for generating javadoc comment for my methods...this is possible in IDEA but I don't know how to do in netbeans.
 
Manish. 

krishnas <krish...@gmail.com> wrote:

Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Jeevan Kumar

unread,
Apr 13, 2007, 12:45:54 AM4/13/07
to bo...@googlegroups.com
Hi Krishna,
This is very simple. Once you have typed your declaration right-click on in, got to the refactor sub-menu and choose "Encapsulate fields". This will open a dialog box you can choose to add  either getter or setter or both. Use the tick box below to preview your changes to the class .

@ Manish
 
There is an "Auto comment" tool under the tools menu of Netbeans. Check it out, let me know if it helped.

Regards,
Jeevan

krishnas

unread,
Apr 13, 2007, 1:07:51 AM4/13/07
to bojug
Thanks Jeevan

- krishna

On Apr 13, 9:45 am, "Jeevan Kumar" <jeevan...@gmail.com> wrote:
> Hi Krishna,
> This is very simple. Once you have typed your declaration right-click on in,
> got to the refactor sub-menu and choose "Encapsulate fields". This will open
> a dialog box you can choose to add either getter or setter or both. Use the
> tick box below to preview your changes to the class .
>
> @ Manish
>
> There is an "Auto comment" tool under the tools menu of Netbeans. Check it
> out, let me know if it helped.
>
> Regards,
> Jeevan
>

Manish Gupta

unread,
Apr 13, 2007, 1:44:13 AM4/13/07
to bo...@googlegroups.com
Thanks Jeevan.
It doesn't create javadoc comment automatically...you have to manually write them
 
Manish.


Jeevan Kumar <jeev...@gmail.com> wrote:

jalal udeen

unread,
Apr 13, 2007, 1:47:24 AM4/13/07
to bo...@googlegroups.com
Hi all,
 
im jalal i want to know  what is composite key and  how to set Composite key mssql 2000 pls clear my doubts
 
thanks
jalal

Manish Gupta <manish_...@yahoo.com> wrote:

Check out what you're missing if you're not on Yahoo! Messenger

Rohan Ranade

unread,
Apr 13, 2007, 2:00:29 AM4/13/07
to bo...@googlegroups.com
Hi Manish,

The feature you want is present in Netbeans 5.5 but not turned on by default. Follow this tutorial to get it working - http://blogs.sun.com/roumen/entry/netbeans_quick_tip_24_correct

Netbeans 6.0 will have it enabled by default.
Hope that helps,

Rohan

Manish Gupta

unread,
Apr 13, 2007, 2:23:36 AM4/13/07
to bo...@googlegroups.com
Excellent...that is what I was looking.
 
Thanks again.
 
Manish.
Reply all
Reply to author
Forward
0 new messages