java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4100
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
What are the basic things I should know about NetBeans' architecture to get started? E-mail
User Rating: / 5
PoorBest 

The most important thing is to know what you are trying to do clearly, so you can find what you need to get started quickly. Here are some basic NetBeans factoids which will either answer some questions or whet your appetite for more information:

  • A module is a JAR file with some special manifest entries. The NetBeans IDE (5.0 and up) has lots of support for building modules.
  • Modules usually affect the system by putting entries in an XML file inside their JAR, which the system reads.
  • You can add to, remove from, change or completely remove menus from the main window, toolbars and other things from a module
  • To show your own tabs in the main window, you will want to subclass TopComponent
  • The windowing system provides facilities for tracking selection, and actions can be made sensitive to selection. Selection typically centers around use of Nodes; it is also possible to have context sensitive actions without Nodes.
  • It is possible to build tree and other views of objects very quickly using Nodes in conjunction with Explorer Views
  • Many pieces of NetBeans UI are really views of some folder in the configuration filesystem which modules install things into
  • The configuration filesystem is read-write, and changes can be saved to the user's settings directory
  • Applications built on NetBeans do not have to be IDE-like - there is plenty of support for editing files available in the Editor module and friends, but you do not even have to include those modules in your application if you do not use them

A lot of things in NetBeans are based around file recognition and using files to provide Java objects. Even if your application has nothing to do with editing files, this may still be very useful to you, since the same mechanism that recognizes/displays a user's files on disk also recognizes/displays configuration data (which may not even be files in the traditional sense at all), and such "files" can actually be factories for whatever kind of object you want (and that way you get persistence of those files for free).

For example, the FeedReader tutorial simply serializes POJO Feed objects into the configuration filesystem, and its whole UI consists of aiming a standard tree component at a folder full of those objects, and providing a few actions to let the user create more of them. When the application shuts down, it does not need to any special code for persisting them, it is all automatic.

For more information about how that works, see the section on file recognition.

One of the most basic and important things to know about is how modules register objects - this is mainly done through a configuration file inside the module's jar file (if you are using NetBeans 5.0 or greater's module building support, you can usually avoid hand-editing this file). Most things a module does to influence the environment are declarative rather than programmatic - in other words, you put some text in an XML file, or an entry in a jar manifest, or a file in some specific place in the module jar, and your functionality will be discovered when the system starts up - as opposed to writing java code.

Two of the most common needs are opening custom Swing components in the UI, and installing actions in the main menu.

Other basic topics that are worth reading to get the lay of the land are:

There are various tutorials, and the canonical reference to NetBeans APIs is the API javadoc.

Source: NetBeans FAQ


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.