Over a million developers have joined DZone.

Quick NetBeans Platform Tip 2: Fix Navigator Mode in NetBeans Platform Applications

DZone's Guide to

Quick NetBeans Platform Tip 2: Fix Navigator Mode in NetBeans Platform Applications

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

When you create a new NetBeans Platform application and use the default platform, there’s a little bug you should be aware of. When you create a new Window Component the Wizard will let you choose from the set of available Positions ( =Modes ) in your Platform. That’s nice, but sometimes it doesn’t work. Tanja Drüke has referred to this problem during her talk at the NetBeans Demo Camp in Munich. She had added some Window Components to the “Navigator” mode in her application, but it simply wouldn’t show up there. Instead the Windows would always go to “Explorer” Mode instead.

She finally fixed that by creating her own mode simply copying the mode definition from Navigator, which is a clever & pragmatic way - but what’s the reason for this bug? Actually the wizard shows all modes in the platform you’re using (the IDE in that case) and doesn’t care if the Modules defining the mode is also part of your application. The Navigator Mode isn’t part of the platform (although it probably should be), and by default doesn’t get added to a new Platform Application. When the application is running, the Window System won’t find the mode and add it to the “default” mode instead, which is “Explorer”. We sorted this out during our discussions at the NetBeans Demo Camp in Munich. Should you happen to be in the Munich area join us for the next event for more neat tricks on NetBeans Platform development.

From http://eppleton.sharedhost.de/blog/?p=306



Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}