Re: TrayIcon with PopupMenu or JPopupMenu ?
- From: a249@xxxxxxxxxxxxxx
- Date: 24 Feb 2007 13:03:56 -0800
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);
.
- Follow-Ups:
- Re: TrayIcon with PopupMenu or JPopupMenu ?
- From: kermitas
- Re: TrayIcon with PopupMenu or JPopupMenu ?
- References:
- TrayIcon with PopupMenu or JPopupMenu ?
- From: kermitas
- TrayIcon with PopupMenu or JPopupMenu ?
- Prev by Date: Using SwingWorker with user interaction
- Next by Date: Re: Using SwingWorker with user interaction
- Previous by thread: TrayIcon with PopupMenu or JPopupMenu ?
- Next by thread: Re: TrayIcon with PopupMenu or JPopupMenu ?
- Index(es):
Relevant Pages
|