There are example modules available in CVS that show how to use specific APIs. The easiest way to get them is to do a CVS checkout of the platform project, which is the new home for developer documentation (other than this wiki).

 cvs -d:pserver:This email address is being protected from spambots. You need JavaScript enabled to view it.:/cvs login
   [press enter when prompted for the password]
   cvs -d:pserver:This email address is being protected from spambots. You need JavaScript enabled to view it.:/cvs co platform_nowww

Source: NetBeans FAQ