NetBeans Platform Cookbook


NetBeans Platform Cookbook


  • Javier A. Ortiz Bultrón
  • Miloš Šilhánek

Book provides frequently and rarely (too) used techniques and code fragments to quick insert code, create some artefact or solve problem by creating rich application using NetBeans Platform. The idea of this book is to provide collected information for quick search and eliminate searching information spread in several documentation documents. The developer saves his time.

It is assumed that the reader has basic knowledge how to create NetBeans modules, module suite and knows basic tasks – e.g. he can create an Action or TopComponent. Some recipes are actualy basic but useful even for advanced readers to quick refer detailsof solution or copy the code template. The book includes explanation of philosophy and infrastructure and list of useful classes or methods where needed as well. This book is dedicated to developers who create a Rich Client / Desktop Application build on NetBeans Platform. It is not deep tutorial or some course (for it see other books listed below). This book is a cookbook. Its purpose is provide prepared solution of tasks or technology step by step, ensure you have made right code, technique, class or method usage, provide basic informations and important details to the reader need not to look into the documentation, provide runable sources to illustrate each topic and enable copy code snippets into your code.


  • Save your time. Lookup up the topic quickly and ensure or find your solution.
  • Step by step.
  • Prepared example sources.
  • Simple introduction to each topic.
  • Lookup the class you could use for your purpose.


TODO we need any FEEDBACK please

01 Modules

Learn the basics of the organization of NetBeans application among some tips on how and where to address some special needs your application might have.

02 User Interface

Create all UI using NetBeans background you know from the IDE – dialogs, wizards, navigator, helps, applicaton options, manage output, status, show progress of tasks, use multiview or the palette.

03 Lookup

Learn how the Lookup approach is used to decouple dependencies and to allow communication between components, how to offer an extension point and provide implementation of corresponding service and how to manage selection.

04 Files and Data

Learn the basic I/O with data using NetBeans platform approach. Also take a look at using databases in your application.

05 (Action)


06 Nodes and Explorer

Learn the basics of Nodes and Explorers for you application. Learn how to present hierarchical data to the user in what is probably the most intuitive and useful UI component of the platform.

07 Visual Library

Introduce yourself to visualising, create skeleton of your visual application and provide your scene.

08 Miscellaneous

Learn important tips and tricks that are not big enough for their own chapter but important enough to be mentioned.

09 Web Services

Learn how to consume various types of web services from your application, one of the main means of interoperability and interaction between applications.

10 Best Practices

Learn how to use NetBeans API for printing, retrieving command arguments, notify about events etc.


Main Wiki page + language




Similar books


  • You could create book support page in your native language.
  • Send us requirements, wishes or missing tips. Use mailing list for it - the NetBeans Platform Development m. list now and project-m.list in the future.
  • If something is not comprehensive or needs other explanation ask for it or suggest any adds, please.

This page was created for reader's support. We will create other resources, e.g. FAQ.

Note to sources


Text and Sources are made and tested by JDK 1.6 and NetBeans 6.9.1 and 7.0b. We will update them to JDK 1.7, NB 7.1 as soon as possible.

Warning dialog

When this warning dialog is appeared when you run some sample you add these modules to your IDE or you use other NB version (and this module is new).


To run, press "Disable Modules and Continue" button.


  • You added some modules which were not installed early in your development IDE.
  • You used other NB version - some other modules were added, or versions.

When you have developed this project the list of modules in the used NB Platform was different than now in the used one. E.g. I made it in NB 6.9 and now in 7.0 or 7.1 or I added some modules - Java Hints, debugger, Maven modules.

You need to omit unused modules from the Platform used for build.

Open Suite module project properties, choose Libraries and unselect unnecessary modules or full cluster. Missing modules you can add manually or by the Resolve modules button.

If you are building RCP application the better way is to use your own stable platform like KarelNB project. It is described in the chapter 8 Miscellaneous.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo