After blogged about How to display your own PHP code-templates in the code completion of NetBeans IDE a NetBeans user asked me how it works for Java code.
Yes, it is possible and it is even simpler. Since NetBeans 7.4 (issue #160771) you can define the context, where code-template has to be shown. Don’t be overwhelmed by the available contexts. For completions within a block/method choose