hi ,
i have created a small program to create a systemtray icon and i want this to be shown on multiple machines ,
how can i add trayicon on many machines running it from my machine ?
trayicon code:
if (SystemTray.isSupported()) {
final SystemTray tray = SystemTray.getSystemTray();
Image image =Toolkit.getDefaultToolkit().getImage("info.jpg");
PopupMenu popup = new PopupMenu();
final TrayIcon trayIcon = new TrayIcon(image, "Alert", popup);
// Info
MenuItem item = new MenuItem("Info");
item.addActionListener(new ShowMessageListener(trayIcon,
"Alert!", message, TrayIcon.MessageType.INFO));
popup.add(item);
// Close
item = new MenuItem("Close");
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
tray.remove(trayIcon);
}
});
popup.add(item);
try {
trayIcon.setImageAutoSize(true);
tray.add(trayIcon);
/
Adding a Popup kind of Alert for Tray Icon
/
trayIcon.displayMessage("Alert!", message, MessageType.INFO);
} catch (AWTException e) {
System.err.println("Can't add to tray");
}
} else {
System.err.println("Tray unavailable");
}
BR,
chinnu