Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have write this method:
Java
private void addTray() { 
  ImageIcon ii=new ImageIcon("bulb.gif"); 
  Image img=ii.getImage(); 
  TrayIcon trayIcon=new TrayIcon(img,"Menu Cari",popMenu); 
  SystemTray systemTray=SystemTray.getSystemTray(); 
  try { systemTray.add(trayIcon); } catch (Exception e) { } 
}

private void addTray() { 
  ImageIcon ii=new ImageIcon("bulb.gif"); 
  Image img=ii.getImage(); 
  TrayIcon trayIcon=new TrayIcon(img,"Menu Cari",popMenu); 
  SystemTray systemTray=SystemTray.getSystemTray(); 
  try { systemTray.add(trayIcon); } catch (Exception e) { } 
} 

and locate the method in constructor, but why the icon didn't displayed?
nb:just the icon didnt displayed, the system tray success work
Posted
Updated 20-Nov-11 19:50pm
v3
Comments
Sergey Alexandrovich Kryukov 20-Nov-11 21:47pm    
Please don't post part of your question as "solution" -- it is not. The post will be removed, no one gets e-mail notifications. Instead, use "Improve question" above. Sandwich the code samples in <pre lang="Java">...</pre>.

Thank you for understanding.
--SA
TorstenH. 21-Nov-11 1:51am    
Where I come from are line breaks used - so I added some.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900