Re: TrayIcon with PopupMenu or JPopupMenu ?



On Feb 24, 1:49 pm, kermi...@xxxxxxxxx wrote:
I spent last 10 whole days digging menu things in TrayIcon with no
success :((.

Read the documentation.

I have three guestions.

There are no three questions, just fragments of things not making
sense. Maybe you want

URL url = getClass().getResource("/images/trayicon.gif");
if(url == null) {
return;
}
Image ii = new ImageIcon(url);

PopupMenu pm = new PopupMenu("Tray Menu");
MenuItem mi = new MenuItem("Item");
mi.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("item action");
}
});
pm.add(mi);

TrayIcon ti = new TrayIcon(ii, "Tray Icon", pm);

.



Relevant Pages

  • Re: XP Requirement Analysis?
    ... The statements I had read in XP documentation is temporary and/or should be ... and tdd used in XP have demonstrated success. ... Can a "large" project satisfiy all criteria of an XP ... so (concidering the impossiblities of shared ownership and pair-programming ...
    (comp.object)
  • Re: acpi
    ... > I have tried to get acpi working with absolutely no success. ... > RH8, though, and I am an idiot when it comes to things like compiling the ... I haven't searched for documentation for a few months, ...
    (RedHat)
  • Re: mail/horde
    ... On Friday 20 July 2007 08:36:38 Jonathan Horne wrote: ... much success. ... yields documentation only for ancient versions of the port, ...
    (freebsd-questions)
  • Re: [Q] how to set virtual IP on AS 4
    ... I'm trying to dig up some documentation that details the difference ... between using ifconfig and ip without success. ... Any insight from the ...
    (RedHat)
  • Re: Need help with a DLT8000
    ... > I found the documentation, so now it getx exiting.... ... No success. ... I added the jumpers for ID=0, ...
    (comp.periphs.scsi)