Beispiel #1
0
 private void itemSelected(ComponentEvent ce) {
   Window w;
   if (ce instanceof MenuEvent) {
     MenuEvent me = (MenuEvent) ce;
     w = me.getItem().getData("window");
   } else {
     w = ce.getComponent().getData("window");
   }
   if (!desktop.getWindows().contains(w)) {
     desktop.addWindow(w);
   }
   if (w != null && !w.isVisible()) {
     w.show();
   } else {
     w.toFront();
   }
 }
 @Override
 public void onStop() {
   if (window != null && window.isVisible()) {
     window.hide();
   }
 }