Archive

Archive for the ‘Uncategorized’ Category

Recipe 5: Notifications

October 11, 2011 Leave a comment

Problem

How can I display a notification (e.g. ) in a form of ‘bubble’ that notifies the user e.g. that something went wrong?

Solution

Since NetBeans 6.7 a new class was introduced which displays a notification on the right side of the status bar:

NotificationDisplayer.getDefault().notify(String title, Icon icon, String detailsText, ActionListener detailsAction);
NotificationDisplayer.getDefault().notify(String title, Icon icon, String detailsText, ActionListener detailsAction, Priority priority);
NotificationDisplayer.getDefault().notify(String title, Icon icon, JComponent balloonDetails, JComponent popupDetails, Priority priority);
NotificationDisplayer.getDefault().notify();
Categories: Uncategorized

Useful links

December 5, 2010 Leave a comment
Categories: Uncategorized