There is currently no API to do this directly, but you can get a reference to the native host frame as follows:
java.awt.Frame hostFrame = (java.awt.Frame)display.getDisplayHost().getParent(); You can then set the visibility of this frame to hide the entire application. On Mar 7, 2010, at 11:03 AM, Daniel Iwan GM wrote: > I would like to hide / show main frame of the application created with > DesktopApplicationContext.main(HelloWTKX.class, args); > Basically it's because I want to keep it in system tray. > > window.setVisible(false) > > hides only the content of the window while window.getParent.setVisible(false) > display message > > Exception in thread "main" java.lang.UnsupportedOperationException: Can't > change the visibility of the display. > at org.apache.pivot.wtk.Display.setVisible(Unknown Source) > at com.daniel.iwan.nmtfeeder.gui.pivot.HelloWTKX.main(HelloWTKX.java:64) > > Thanks
