For information on profiling Java applications in NetBeans IDE, see the following chapter in the User's Guide:
Developing Applications with NetBeans IDE,