0

How to return a trayIcon, specifically for the "remove" method in SystemTray. I want to remove the auto-generated trayIcon that java creates when it runs the program. Essentially I would like the program to run without appearing in the SystemTray.

  • Are you talking about the "task bar" where running applications appear or the small icons that appear with along with the clock in Windows? The first is reasonably achieved (under Windows at least), the second is not – MadProgrammer Jun 13 '13 at 23:18
  • Yes, the task bar. I do not want it to be blatantly obvious that the application is running (although obviously it would still appear in task manager). And I am using windows. – user2484163 Jun 14 '13 at 00:34
  • How is current program running? Is it a console, AWT, Swing? – MadProgrammer Jun 14 '13 at 00:37
  • This is the code. However it returns an empty array, throwing an array out of bounds exception. It seems unable to return the trayicon of the application itself... SystemTray t=SystemTray.getSystemTray(); TrayIcon trayIcon[]=t.getTrayIcons(); t.remove(trayIcon[0]); – user2484163 Jun 14 '13 at 15:19
  • Okay. The `TrayIcon` has nothing to do with the icons on the task bar. You can use a `JDialog` or `JWindow` which won't appear on Windows task bar – MadProgrammer Jun 15 '13 at 00:49

0 Answers0