Java and Linux: TrayIcon and Task Switcher issues -


i have application runs on windows (great) , ubuntu 12.04 (facing couple interface issues). first, have code below implement trayicon:

if (systemtray.issupported()) {      // systemtray instance     systemtray tray = systemtray.getsystemtray();      // load icon     java.awt.image image = null;     try {         image = imageio.read(getclass().getresource("icon.png"));      } catch (ioexception exc) {         exc.printstacktrace();     }      /**      * few listeners popup menu items click.      */     // create popup menu , items    popupmenu popup = new popupmenu();    menuitem openitem = new menuitem("open");    openitem.addactionlistener(openlistener);    popup.add(openitem);     popup.addseparator();     menuitem closeitem = new menuitem("close");    closeitem.addactionlistener(closelistener);    popup.add(closeitem);     trayicon = new trayicon(image, "app test", popup);     try {        tray.add(trayicon);    } catch (awtexception exc) {        exc.printstacetrack();      } }     

this png icon has transparent backgrond. said, works fine on windows. on linux gets white background. also, when mouse on icon, label (not tooltip) "javaembeddedframe" shown.

my .desktop file (in /usr/share/application) set as:

[desktop entry] encoding=utf-8 name=apptest genericname=apptest comment=testing exec=/bin/sh "/usr/share/apptest/test.sh" icon=/usr/share/apptest/icon.png terminal=false type=application startupnotify=true 

when alt+tab, isn't show "apptest" "java" application icon , default java icon (like window) "java.lang.thread" description.

any ideas of how fix it? in advance!


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -