Displaying Images in Netbeans Platform Node Tooltips

Netbeans Platform allows you to display HTML inside a node’s tooltip text. Naturally this means you can display images. For example, project nodes in the Netbeans IDE display icons related to errors (if there are any) and version control:

Netbeans Node Tooltip Images

Achieving this is not very straight forward, since the documentation doesn’t really say much on how to load this image. Fortunately it is very simple.

netbeans platform

Troubleshooting Strange AWS Issues

We’ve all been there. The same things working fine one time but failing other times without any idea why.

This post is a list of troubleshooting strange issues I’ve encountered when using AWS.

ElasticBeanstalk Failing to Create RDS Security Group

I was having an issue where I couldn’t create and attach an RDS database to an ElasticBeanstalk environment because an RDS security group was failing at being created. All this was being done using the AWS console.

aws

Loosely Coupled Node Actions in Netbeans Platform

Nodes in Netbeans Platform can possess actions that can be executed with the node object as context. For example, the Project, Package, and Class nodes in the Netbeans IDE have a set of actions which can be seen by right clicking on the nodes:

Netbeans IDE Node Actions

In the Netbeans Platform tutorials I found a tutorial that explains how to add these actions to nodes. The problem is that in that tutorial the action class was created as an inner class of the node class. Making the action tightly coupled with the node.

I managed to implement a more modular and loosely coupled approach, which is what I will explain in this post.

Our loosely coupled approach will basically allow us to:

  1. Keep the domain logic (Java Beans and POJOs) in its own domain module.
  2. Keep the view logic (nodes that represent beans) in another module.
  3. Keep the node actions logic in yet another module. This allows us to plug and unplug different action’s that belong to separate modules. Making our application’s node actions very modular.

Let’s begin!

netbeans platform

Netbeans Platform Status Bars

In desktop applications, status bars are a great way to convey information to the user about the current status of certain items in the application, such as connection status, total amount of items, current mode, current row and column number in an editor, etc.

Implementing custom status bars to a Netbeans Platform application is extremely easy. In this article I will go over how we can achieve really cool things with status bars and lookups.

Creating and Registering a New Status Bar

To create a new status bar, create a new Java class that implements the StatusLineElementProvider interface. To register it as a status bar, we use the @ServiceProvider annotation:

@ServiceProvider(service = StatusLineElementProvider.class, position = 1)
public class MyStatusBar implements StatusLineElementProvider {

}
netbeans platform

Implementing Auto Updates for a Netbeans Platform Maven Application Using Github Pages

Being able to update an application when a new version is released is something of critical importance for desktop applications. Otherwise, the process of updating the application is extremely tedious since you have to download more installers all the time.

Luckily, Netbeans Platform comes with integrated support for enabling your custom applications to be able to be updated when a new version is released.

In this post I will go over how to implement this on a Maven based Netbeans Platform application.

How Netbeans Update Center Works

The Update Center is how we can achieve this functionality. The way it works is that you publish your module’s NBM files to a web server, along with a XML catalog file that contains information about the modules such as latest release timestamp, latest version, etc.

When you configure an update center in your application, you will configure this web server’s URL so that the update center client knows where to poll and where to download the new module files to install.

netbeans platform maven
← Newer Posts Older Posts →