Desktop API vs Runtime.exec()
I'm often asked why is that new class, java.awt.Desktop, is introduced. They state all the required actions can be performed with the call to one of Runtime.exec() methods:
is close to
Runtime.getRuntime().exec("start " + filename);
So I decided to write a couple of words...
What's the problem?
Tray icons introduced in Mustang have several properties and methods corresponding to image for the icon, tooltip text, popup menu and ability to show some message to the user. Let's inspect the popup menu more closely.
Popup menu used in tray icons must be an instance of java.awt.PopupMenu. This class represents a menu and allows to insert or delete simple menu items and...