Below is a snippet of my code:
SystemTray systray = SystemTray.getSystemTray(); try{ TrayIcon trayicon = new TrayIcon(new ImageIO.read(new File("icon.png")),"I am a description"); } catch(IOException e) { e.printStackTrace(); }
Everything works smoothly, but the image displayed on the taskbar turns off. Only the upper left part is displayed, if I do not decrease to 16x16 (from 40x40). icon.png
is an image file that is loaded correctly (but not null). I thought the system tray icon files could be 40 pixels?
Can someone please explain to me what the problem is?
source share