Geertjan is a DZone Zone Leader and has posted 468 posts at DZone. You can read more from them at their website. View Full User Profile

Lingen on the NetBeans Platform

  • submit to reddit

A group of students at the Fachhochschule (technical college) Osnabrück in Lingen, Germany, are currently taking a NetBeans Platform course. We're using NetBeans IDE 7.0 Beta 2 and so far, as far as I am aware, there have been no problems (just much much faster than before, plus nice TopComponent annotations, hurray) that have arisen as a result of using this beta release.

The day started with an overview of what NetBeans is, where it comes from, and what the main features of the NetBeans Platform are. Then we deep dived into the module system. Dream team member Aljoscha Rittner is delivering the course together with me, he's currently introducing the class to the window system.

Here's a snapshot:

We've created a few small applications so far, such as this pluggable text editor. Each of the tools shown in the combobox below comes from a different plugin, while the window shown below doesn't know anything about them. Instead, the Lookup.getDefault construction is used to load implementations from the META-INF/services folder:

The interesting code, in the constructor of the window:

final DefaultComboBoxModel dcbm = new DefaultComboBoxModel();

Collection<? extends WordFilterInterface> allFilters = Lookup.getDefault().lookupAll(WordFilterInterface.class);

for (WordFilterInterface filter : allFilters) {

jButton1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

String myPlainText = jTextField1.getText();

WordFilterInterface wfi = (WordFilterInterface) dcbm.getSelectedItem();

String myProcessedText = wfi.process(myPlainText);





The question you might have is how, if the filter is added to the combo box, is a string displayed in it? Well, the combo box has a default renderer that uses the toString() method of the object it displays to create the label displayed within it:

public class LowercaseFilter implements WordFilterInterface {

public String name() {
return "Lowercase";

public String definition() {
return "Turns the word to lowercase";

public String process(String word) {
return word.toLowerCase();

public String toString() {
return name();


Interested in a NetBeans Platform training too? Go here for all the details.


Published at DZone with permission of its author, Geertjan Wielenga.


Tushar Joshi replied on Fri, 2011/02/25 - 5:56am

All the best for the rest of the session to all the participants from NUG Nagpur.  We had this session on Skype+Webex from Geertjan and it was fantastic experience.

with regards

Tushar Joshi
NUG Nagpur

Matt Coleman replied on Tue, 2011/11/15 - 12:48am

 this explains it all


web designer buffalo

Mateo Gomez replied on Fri, 2012/02/03 - 12:40am

i can see from the photo a very busy group of people chicken burrito recipe

Cata Nic replied on Mon, 2013/09/02 - 4:15pm

 The entire team looks like is really ready to obtain better solutions for their clients. That's explains a lot of things...

Ray Naa replied on Sun, 2014/09/21 - 1:54pm


very interesting post.this is my first time visit here.i found so mmany interesting stuff in your blog especially its discussion..thanks for the post!
all new toyota innova 2015

Ray Naa replied on Wed, 2014/09/24 - 5:50pm


I read a article under the same title some time ago, but this articles quality is much, much better. How you do this..

Ray Naa replied on Tue, 2014/09/30 - 5:50pm


I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.
window cleaner perth

Ray Naa replied on Sun, 2014/10/05 - 1:57pm


very interesting post.this is my first time visit here.i found so mmany interesting stuff in your blog especially its discussion..thanks for the post!
Parenting Blog

Ray Naa replied on Wed, 2014/10/22 - 1:31pm


Im no expert, but I believe you just made an excellent point. You certainly fully understand what youre speaking about, and I can truly get behind that.
play frozen games

Ray Naa replied on Sat, 2014/10/25 - 5:17pm


I high appreciate this post. It’s hard to find the good from the bad sometimes, but I think you’ve nailed it! would you mind updating your blog with more information?
passo dopo passo

Ray Naa replied on Sat, 2014/10/25 - 5:58pm


This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post.!
best way to control blood sugar naturally

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.