Netbeans Platform is a framework based on Swing, with the help of which you can create large desktop applications. The same name Netbeans IDE is created, just, based on the Netbeans Platform. It contains many APIs for easier work with windows, actions, files, etc.
In fact, the Netbeans Platform is an analogue of the Eclipse RCP (Rich Client Platform), based only on Swing, not SWT. Find out what's best, I'm not going. It is believed that the Netbeans Platform is easier to learn, less “buggy” and, since it is based on Swing, it supports more platforms and the application created on it looks the same everywhere. However, some things are missing in it.
Each individual feature in an application on the Netbeans Platform can be represented by a separate module, which, in turn, are comparable to a plugin. The Netbeans module is a group of Java classes that provides the application with certain functionality.
')
Unfortunately, there is very little material in Russian. More precisely, I did not find anything. You should add the
netbeans.org/features/platform/all-docs.html page to your bookmarks, there is almost everything you might need.
Getting Started.
For starters, you should download the Netbeans IDE with the support of the Netbeans Platform. Follow this link:
netbeans.org/downloads/index.html and download any version where there is a daw in front of the NetBeans Platform SDK.
As an introduction, we will create an application that somehow converts the entered text.
We start IDE, in the File menu we select the item "Create Project". Next, in the opened window, select “Netbeans Modules” -> “Application for the Netbeans Platform”. Click "Next", write some name of the project and the directory where it will be stored. In the end, click "Finish".

The development environment will create a new project, in which there is nothing, but despite this, you can run it. As you can see, the list of modules is empty, let's create a new module for the window, which will have an input field and an action call button. To do this, right-click on the "Modules" -> "Add a new ...". Again, we come up with a name and click "Next." After that, we write the code name "org.word.editor.core", and click the "Done" button.
The result is a new module, it can be seen in the list of projects. Click the right button on it, select "Create" -> "Other". In the window that opens, in the "Module Development" category, select "Dialog", "Next." The position of the main window is set “editor”, again “Next”, we write “Text” in the prefix of the name of the class and “Done”.
At the opened form, throw a "Text field" ("Text field") and a button.

"JTextArea1" renamed to "text". Then double click on your button and paste the following code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
text.setText(text.getText().toUpperCase());
}
Run the project (F6 key). In the appeared window choose “Window” -> “Text” and a window will appear on the screen, which are described in our module.

Modular application using Lookup.
In this section, we will create two additional modules. The first module, TextFilterAPI, contains the interface of the service provider. And the second module, “UppercaseFilter”, is the service provider for the interface. The GUI module written earlier will in no way refer to the UppercaseFilter service provider code. This is possible because the UppercaseFilter will be registered in the META-INF / services folder and loaded using the Netbeans Lookup class, which is similar to the ServiceLoader class from JDK6.
In the project window, create a module named TextFilterAPI. Click "Next" and in the code name field enter "org.word.editor.api" and "Done". In the new module we create the TextFormater interface, as follows:
package org.word.editor.api;
public interface TextFilter {
String process(String s);
}
In the properties of the TextFilterAPI module, go to the tab "API versions" and in the list of public packages put a checkmark in front of "org.word.editor.api".

Create another module with the name "UppercaseFilter" and the code name "org.word.editor.uppercase". Open the properties of this module, in the "Libraries" tab add dependencies on "TextFilter" and "Lookup API".

After that we create the UppercaseFilter class in the “org.word.editor.uppercase” package as follows:
package org.word.editor.uppercase;
import org.openide.util.lookup.ServiceProvider;
import org.word.editor.api.TextFilter;
@ServiceProvider(service=TextFilter.class)
public class UppercaseFilter implements TextFilter {
public String process(String s) {
return s.toUpperCase();
}
}
Now go to the first module responsible for the GUI. In its properties, we set the dependency on “TextFilterAPI” and change the code for handling the keystroke to the following:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String enteredText = text.getText();
Collection<? extends TextFilter> allFilters = Lookup.getDefault().lookupAll(TextFilter.class);
StringBuilder sb = new StringBuilder();
for (TextFilter textFilter : allFilters) {
String processedText = textFilter.process(enteredText);
sb.append(processedText).append("\n");
}
text.setText(sb.toString());
}
Now you can run the application. You can add the “LowercaseFilter” module in a similar way, which will automatically process the text.