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
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.
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.
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.
Learn the basic I/O with data using NetBeans platform approach. Also take a look at using databases in your application.
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.
Introduce yourself to visualising, create skeleton of your visual application and provide your scene.
Learn important tips and tricks that are not big enough for their own chapter but important enough to be mentioned.
Learn how to consume various types of web services from your application, one of the main means of interoperability and interaction between applications.
Learn how to use NetBeans API for printing, retrieving command arguments, notify about events etc.
Main Wiki page http://wiki.netbeans.org/BookNBPlatformCookbook + language
Book - content, sources http://publisher.com/book/nbpcb/ (not available)
Content as PDF http://publisher.com/book/nbpcb/content (not available)
Sources http://publisher.com/book/sources 42 MB (not available)
Downloads http://java.net/projects/projectname (not available)
Repository https://hg.java.net/hg/projectnamerepository (not available)
- 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.
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.