Thursday Nov 26, 2015

Supply Chain Management with Java and NetBeans

Yesterday I mentioned joining in on a discussion with the LIMO (Logistics Impact Model) team at Fontys in Venlo. In their own words, this is what LIMO ( is all about, from the LIMO user guide:

I checked out LIMO from its GitHub repo and built it. It is a Maven-based application, which is one of its many nice aspects, i.e., no need to configure anything, just build the project and Maven handles everything for you. Then run it and you can begin modeling your supply chains, using the sample data that you can get from the LIMO site:

(Embedded satellite view put together by me today, thanks to Neil C. Smith!)

From a technology point of view, the best part is the JavaFX integration. I.e., after doing your modeling work, above, you can simulate the impact of the modeled supply chain, which is rendered in JavaFX charts, as shown below in two images:

There's still a lot to be done, enough for several new generations of students at Fontys. However, clearly, the project is very promising and has a lot of potential for actually being useful beyond its specific intended audience, i.e., this is the basis of a generic supply chain modeling platform.

Wednesday Nov 25, 2015

NetBeans at Fontys International Campus Venlo

Today I spent some time at Fontys International Campus Venlo, the software development department of which started the new academic year a few weeks ago. A perfect opportunity to be introduced to a thorough overview of the key features of NetBeans IDE.

I talked about the history of NetBeans IDE as a student project, about the fact that it is free and open source, and its many tools especially for Java and JavaScript. I did several demos, including Java EE/Maven and usage of the NetBeans Connector for Chrome, in combination with the new Oracle JET technology.

Here's part of the group, with me in action:

After the session above, I met with some of the students, and their mentors, to discuss the current status of LIMO, the Logistics Impact Model, created on the NetBeans Platform, as an ongoing project carried over from one year to the next at Fontys. I've given several courses at Fontys for different generations of students working on this project, which is for a specific customer in the Venlo area, though it can be useful as well for any organization interested in logistics modeling. Here's a pic of the discussion today:

Here you see the application in action: multiple windows provided by TopComponents and the NetBeans window system, drag/drop features provided by the NetBeans Palette, and a Visual Library scene for rendering and organizing widgets. The application looks really clean and professional.

The next steps for the project include the integration of the Project API, and related components, to make it possible for users to create and work with multiple projects simultaneously. Especially cool is the integration with JavaFX, especially with the JavaFX chart components:

The application is becoming really good and has been open sourced here:

Thursday Sep 24, 2015

Sessions Featuring NetBeans at JavaOne 2015

Coming to JavaOne this year? There's a long list of sessions of various kinds where you'll see and learn about NetBeans IDE.

There is an overview of them all, starting with Monday, showing who is speaking, and where to go to see them:

Full list:

Saturday May 23, 2015

News from the Modular JavaFX Application Framework

The last time I reported on the status of the mFX project was in July last year.

The biggest problem at that time was that the mouse didn't work on the menus. I ran the project again today and I guess my JDK is different (newer) than what I was using at that time because now that problem is fixed, without any changes in my code, i.e., something has been enhanced on the JavaFX level.

Click to enlarge the image below to see a JavaFX application on top of mFX:

The remaining problem is that the window system is still in Swing. If the tabs could somehow be rewritten to JavaFX (and I have tried several things without success) then the entire application would be stylable via CSS.

Aside from that, it's looking pretty good. Above, you see a CSS-styled label that updates itself, via NetBeans Lookup, based on whatever the user has chosen in the selector window in the top right. There's an editor module, a viewer module, and a domain module, in other words, mFX truly enables you to do modular JavaFX development, using all the techniques provided out of the box by the NetBeans Platform, i.e., modularity, loose coupling, and pluggability.

Friday May 22, 2015 in the NetBeans Platform

Let's integrate in a NetBeans Platform application so that you can, for example, have an interesting TopComponent like the below.


  1. Copy this class into a NetBeans module.

  2. In your TopComponent, which here is named 'NBMediaPlayerTopComponent':
    public NBMediaPlayerTopComponent() {
        setLayout(new BorderLayout());
        JPanel playerpanel = new JPanel();
        final JFXPanel jFXPanel = new JFXPanel();
        add(playerpanel, BorderLayout.CENTER);
        Platform.runLater(new Runnable() {
            public void run() {
    private static void initFxLater(JFXPanel panel) {
        MediaPlayer mediaPlayer = new MediaPlayer(new Media(MEDIA_URL));
        panel.setScene(new Scene(new MediaControl(mediaPlayer)));


Saturday May 16, 2015

Porting Knockout Components to DukeScript

With Knockout, you can extend the DOM by means of widgets, also known as 'components', such as the "user" component that you see below, which has the parameters "firstName" and "lastName":

As discussed yesterday and the day before in this blog, a component is created in JavaScript, like this:

ko.components.register('user', {
    viewModel: function (params) {
        this.firstName = ko.observable(params.firstName);
        this.lastName = ko.observable(params.lastName);
        this.fullName = ko.pureComputed(function () {
            return this.firstName() + " " + this.lastName();
        }, this);
        'First Name: <input data-bind="textInput: firstName"/>\
        Last Name: <input data-bind="textInput: lastName"/>\
        <h2 data-bind="text: fullName"></h2>'

As you can see here, by means of 'ko.components.register', you're able to register a new component, which is named 'user' here, consisting of a viewmodel and a template.

Now let's imagine we're using DukeScript, i.e., the WORA framework for Java programmers. Imagine you have several Knockout components like the above, how would you integrate them into your DukeScript application?

One of the Maven projects provided by the DukeScript Maven archetype has "JavaScript Libraries" in its name:

Notice that in the above there's a JavaScript file named 'userEntryComponent.js'. The content of that file is the 'user' component described in code at the start of this blog entry. Also notice that there is a Java source file in the above screenshot, named '', which has this content:

package org.demo.ko4j.DemoKO4J.js;


@JavaScriptResource(value = "userEntryComponent.js")
public final class UserEntryWidget {

    private UserEntryWidget() {

    @JavaScriptBody(args = {}, body = "")
    public static native void registerComponent();


Notice that there is a reference to the JavaScript file, as well as a static method named 'registerComponent'.

OK, congratulations, you have ported your Knockout component to DukeScript, which consists of (1) copying the JavaScript file into the correct place in the DukeScript application structure and (2) registering it via the @JavaScriptResource annotation shown above.

The final step is to use the component. In the '' class, i.e., in the Maven project where the client code is defined, you need the following:

public static void onPageLoad() throws Exception {
    Data d = new Data();
    Models.toRaw(d); // this line is required to initialize knockout

Notice the two lines in bold above. Notice that we're calling the static method in the UserEntryWidget class above. Also notice that we do not initialize the Data class above, i.e., we do not need to use 'setFirstName' and 'setLastName' on the Data class, because the initialization is done when you make use of the 'user' component, as you can see in the first screenshot above.

That's all you need to do to include a Knockout component in a DukeScript application.

Wednesday Apr 29, 2015

Node.js Express App in NetBeans IDE

The Visual Studio tutorial "Developing Node Applications" is... all about using the command line to set up a Node application. Here's the NetBeans IDE equivalent (using a development build, i.e., this is not in NetBeans IDE 8.0.2) of at least the first half of that tutorial, in screenshots, i.e., the whole process is automated, which is the point of tooling, i.e., to provide automation.

Click Finish after the above steps and you have a complete Express application, exactly the same as described in the Visual Studio tutorial above.

Then run it and you can use the many supporting tools in the IDE to tinker further with your application:

Sunday Apr 26, 2015

YouTube: How to Setup and Use Minecraft Forge

Quite impressed by Minecraft Forge, as well as how well it integrates via the Gradle plugin into NetBeans IDE:

Saturday Mar 07, 2015

Happy Birthday, Java!

\header {
  title = \markup { \italic "Happy Birthday, Java!" }

\paper {
  indent = #0

\score {
  \new PianoStaff = "pianostaff" <<
    \new Staff = "right" \relative c'' {
      \clef "treble"
      \time 3/4
      \tempo "Quick and snappy" 4 = 160
       r2 c8 c
       a'4 g f
       g2 e4
       f r f
       g2 c,4
       a' b c
       g2 e8 e
       f4 e d
       c2. r2. \bar "|."
    \addlyrics {
      Ha py birth -- day Ja va, 
      you are twen ty!
      For fun and for gain, 
      pub -- lic sta -- tic void main!
    \new Staff = "left" \relative c {
      \clef "bass"
       c4 <e g> <e g>
       f4 <a c> <a c>
       c,4 <e g> <e g>
       g,4 <b d> <b d>
       c4 <e g> <e g>
       f4 <a c> <a c>
       c,4 <e g> <e g>
       g,4 <b d> <b d>
       c4 <e g> <e g>
       c2. \bar "|."
  \layout { }
  \midi { }

Tuesday Jan 20, 2015

Free: Virtual Technology Summit by Oracle Technology Network

The Oracle Technology Network (OTN) is excited to invite you to the Virtual Technology Summit Series.  Four times a year come and join us to learn first hand from Oracle ACEs, Java Champions, and Oracle product experts, as they share their insight and expertise on using Oracle technologies to meet today‚Äôs IT challenges. Four main content areas covered will be Database, Java, Middleware and Systems.  

Are you struggling in being productive with Maven, HTML5 frameworks such as AngularJS, IoT hardware such as the Raspberry Pi, and Java EE? Do you want free, easy to use, out of the box tools for quickly and efficiently developing all kinds of applications? You really need to give NetBeans a whirl!

In the "Free Open Source Tools for Maven, HTML5, IoT, and Java EE" session, during the upcoming free Virtual Technology Summit by OTN (nice and simple URL we'll show you the latest enhancements and cool features of the free, open-source NetBeans IDE, which are used around the world, from engineers at Boeing and NASA to Java architects such as James Gosling and Stuart Marks!

If you haven't looked at the NetBeans IDE lately, you'll be blown away by the fast speed and performance enhancements. If you are completely new to the NetBeans IDE, see how easy it is to get started and be productive.

Tip: The full agenda is available here and notice that the session described above is in the Java Content Area:

The sessions are prerecorded, while the speakers and other experts will be available live, to answer questions. To give a sneak peak at what the site will look like, take a look at these two screenshots from the session described above.

Click below to register. Pick a date and time that matches your location:

  • Americas February 11th - 9am to 12:30 PT - click here.
  • EMEA February 25th - 9am to 12:30 GMT - click here.
  • APAC March 4th - 9:30am to 1pm IST - click here.

Spread the news to members of your JUGs, colleagues at your office, and fellow students at your schools, colleges, and universities!

Sunday Dec 21, 2014

Integrating Cloud Providers into NetBeans IDE (Part 5)

A small piece to add to the Cloud provider integration is... Git. Since you're able to display all the resources of interest that are made available by the Cloud provider, you should be able to let the user physically access the related sources:

Clicking the menu item above can directly open the Clone Repository dialog, which is part of the Git tools in NetBeans IDE: 

A few clicks later, you have the sources available locally, and you can then make changes to them and commit them, etc, using the range of Git tools made available by NetBeans IDE.

Friday Nov 07, 2014

JFX Fluidon in NetBeans IDE

Here's the new JFX Fluidon plugin by Gaurav Gupta in action in the Family Tree application described in step-by-step detail in "JavaFX Rich Client Programming on the NetBeans Platform". Click to enlarge the image to get the full effect.

It's pretty cool and here's a movie I made of it today:

Sunday Oct 19, 2014

NetBeans Translation Tip #2: Do Not Translate USE_MNEMONICS

So you're working on the NetBeans Translators project and you run the application, with its translated bundles, and then you see this error message:

WARNING [org.openide.awt.Toolbar]: Error in AWT task
	at org.openide.awt.Actions.setMenuText(
	at org.openide.awt.Actions$MenuBridge.updateState(
	at org.openide.awt.Actions$Bridge.prepare(
	at org.openide.awt.Actions$MenuBridge.prepare(
	at org.openide.awt.Actions.connect(
	at org.openide.awt.Actions$MenuItem.(
	at org.openide.awt.DynaMenuModel.loadSubmenu(

You also, assuming you're translating into French and have already translated the text in the error dialog below, see this dialog, once the application has started:

And you're unable to access any of the menu items in the menubar.

An error message that contains "setMenuText(" is one that can be figured out by thinking about where menus are defined, in the NetBeans Platform source code. This is done in the UI Utilities API module, which is org-openide-awt.jar.

When I went there, in "LocalizedNetBeans", I found that there are two translated bundle files there, both in French:

Notice the one in blue above. Through a process of trial and error, I discovered that the key "USE_MNEMONICS" should NOT be translated. If you translate USE_MNEMONICS, the error described above occurs. Simply do not include it in the bundle file shown in blue above, in the 'branding/modules/org-openide-awt.jar' folder. Delete it from there, as I did (which is why the file is shown in blue) if you have it there.

And then the problem is solved: the error message above is not shown and menu items can be accessed again, as normal.

PS: Also see tip #1.

Thursday Oct 09, 2014

YouTube: Quick Tips for AngularJS in NetBeans IDE 8.0.1

Assuming you're able to run Node and Bower from the command line, follow the steps in this screencast to get started with AngularJS in NetBeans IDE 8.0.1:

Tuesday Jun 10, 2014

Fosfor EPUB Reader

Instead of creating a fullblown NetBeans Platform application for doing WYSIWYG editing for EPUB, similar to Sigil, I decided to focus purely on the very narrow scope of EPUB reading. The scope is narrower and, since the application will be a lot less ambitious and smaller, a pure JavaFX implementation makes sense.

When you somehow get, e.g., buy, an EPUB file, you typically read it on a tablet or mobile device. However, some people in the world, e.g., me, still have laptops. Therefore, I'm creating a small JavaFX application that unzips EPUB files, into a temp directory, and then loads them into a JavaFX WebView.

Arabic support:

For an application like this, simplicity is the most important thing. Very few buttons, very few options, preferably no configuration of anything. Just let the user open the EPUB file and read it, that's it, nothing fancy.

CSS stylesheets and images are correctly read. It's exactly what it looks like, a reader for EPUB files. The back and forward buttons are working and you can also switch to the table of contents.

When it is complete, which it pretty much is right now, publishers of EPUB files can make this small app available from their site, to simplify life for their readers, since it will run easily and well on all operating systems.

Friday Feb 21, 2014

YouTube: JPA Model Code Generator for NetBeans IDE

Awesome new plugin for NetBeans IDE!

Get the plugin here:

Friday Feb 07, 2014

James Webb Space Telescope on NetBeans

Great screenshot by Sean Phillips, Duke's Choice Award winner, that provides a visualization of the James Webb Space Telescope Contact Analysis. It uses JavaFX 8 and NetBeans Platform 8 as its basis.

Saturday Dec 28, 2013

New Book: "JavaFX Rich Client Programming on the NetBeans Platform"

Now built into Java and closely integrated with the NetBeans Platform, JavaFX 8 is today's state-of-the-art Java-based toolkit for creating advanced user interfaces, manipulating media, generating graphical effects and animations, and much more. This guide covers everything you need to know to create industrial-strength business applications with JavaFX 8 and NetBeans -- including how JavaFX impacts user experience design, graphical design, and development processes.

Focusing on JavaFX as the front end for tomorrow's most powerful rich client applications, this is the first book to cover the version of JavaFX 8 incorporated into the Java APIs with the official release of Java SE8, instead of obsolete preview versions.

Gail and Paul Andersen fully explain both JavaFX 8 and its relationships with the NetBeans Platform architecture, and systematically show Java developers how to use them effectively together. To support sophisticated real-world business development, they also thoroughly address JavaFX 8 interactions with backend databases, JavaEE, RESTful web services, and the Jersey client.

Release date is September 2014. More info here!

Sunday Dec 15, 2013

Quick Browser for NetBeans IDE 7.4

The Quick Browser I created sometime ago is now available for NetBeans IDE 7.4:

It's pretty handy, e.g., open NetBeans projects by clicking on them in the browser. Open individual files too:

Get it here:

More details on this are here:

Still same open issue as before, unresolved so far:

Monday Oct 21, 2013

OrbitFX: JavaFX 8 3D & NetBeans Platform in Space!

Here is a collection of screenshots from a proof of concept tool being developed by Nickolas Sabey and Sean Phillips from a.i. solutions. Before going further, read a great new article here written on by Kevin Farnham, in light of the Duke's Choice Award (DCA) recently received at JavaOne 2013 by the a.i. solutions team. Here's Sean receiving the award on behalf of the a.i. solutions team, surrounded by the DCA selection committee and other officials:

They won the DCA for helping facilitate and deploy the 2014 launch of NASA's Magnetospheric Multiscale mission, using JDK 7, the NetBeans Platform, and JavaFX to create the GEONS Ground Support System, helping reduce software development time by approximately 35%.

The prototype tool that Nicklas and Sean are now working on uses JavaFX 3D with the NetBeans Platform and is nicknamed OrbitFX. Much of the early development is being done to experiment with different patterns, so that accuracy is currently not the goal. For example, you'll notice in the screenshots that the Earth is really close to the Sun, which is obviously not correct.

The screenshots are generated using Java 8 build 111, together with NetBeans Platform 7.4. Inspired by various JavaOne demos using JavaFX 3D, Nick began development integrating them into their existing NetBeans Platform infrastructure.

The 3D scene showing the Sun and Earth objects is all JavaFX 8 3D, demonstrating the use of Phong Material support, along with multiple light and camera objects. Each JavaFX component extends a JFXPanel type, so that each can easily be added to NetBeans Platform TopComponents. Right-clicking an item in the explorer view offers a context menu that animates and centers the 3D scene on the selected celestial body. 

With each JavaFX scene component wrapped in a JFXPanel, they can easily be integrated into a NetBeans Platform Visual Library scene.  In this case, Nick and Sean are using an instance of their custom Slipstream PinGraphScene, which is an extension of the NetBeans Platform VMDGraphScene.

Now, via the NetBeans Platform Visual Library, the OrbitFX celestial body viewer can be used in the same space as a WorldWind viewer, which is provided by a previously developed plugin.

"This is a clear demonstration of the power of the NetBeans Platform as an application development framework," says Sean Phillips. "How else could you have so much rich application support placed literally side by side so easily?"


Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« April 2016