// TrayUtilitiesDemo is a call which is returning me tray icon create by current java process.
MyMenu.setLabel("MyMenu");
TrayUtilitiesDemo.addPopupMenu(MyMenu);
TrayIcon trayIcon = TrayUtilitiesDemo.getTrayIcon();
System.out.println("TrayIcons are: "+trayIcon);
when i am doing
trayIcon.getPopupMenu().countItems();
it is retrun only 1 menuitem. which is added by me that is MyMenu. there are other 4 menuitems are there added by some other class which is creating this tray icon.
and not able to get the ActionListener also. basically i want to right click on tray icon click and click on menuitem in PopupMenu added by other class(or by other process) for automation. using windows 7 machine.
please help.