« květen 2005 »
PoÚtStČtSoNe
      
     
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 687

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« Previous day (May 24, 2005) | Main | Next day (May 25, 2005) »
20050525 Středa květen 25, 2005
NetBeans Quick Tip #2 - Generating Getters and Setters

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:



    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.