SystemTray tray = SystemTray.getSystemTray();
int w = 80;
int[] pix = new int[w*w];
for (int i=0; i< w*w; i++ )
pix [i]=(int)(Math.random ()*255);
ImageProducer producer = new MemoryImageSource ( w,w,pix,0,w );
Image image = Toolkit.getDefaultToolkit().createImage(producer);
TrayIcon trayIcon = new TrayIcon(image);
trayIcon.setImageAutoSize(true);
startWindow();
try