protected void installDesktopManager() {
   desktopManager = desktop.getDesktopManager();
   if (desktopManager == null) {
     desktopManager = new BasicDesktopManager();
     desktop.setDesktopManager(desktopManager);
   }
 }
 protected void uninstallDesktopManager() {
   if (desktop.getDesktopManager() instanceof UIResource) {
     desktop.setDesktopManager(null);
   }
   desktopManager = null;
 }