Exemplo n.º 1
0
  // <editor-fold defaultstate="collapsed" desc=" main ">
  public static void main(String args[]) {

    try {
      javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }

    Dlg_chat dialog = Dlg_chat.create(new javax.swing.JFrame(), true);
    dialog.setVisible(true);
    Center.setCenter(dialog);
  }
Exemplo n.º 2
0
  public static Dlg_chat create(java.awt.Window parent, java.awt.Dialog.ModalityType modalType) {

    if (parent instanceof java.awt.Frame) {

      Dlg_chat dialog = dialogContainer.get(parent);

      if (dialog == null) {
        dialog = new Dlg_chat((java.awt.Frame) parent, false);
        dialog.setModalityType(modalType);
        dialogContainer.put(parent, dialog);
        java.util.logging.Logger.getAnonymousLogger()
            .log(Level.INFO, "instances: {0}", dialogContainer.size());
        dialog.setThisRef(dialog);
        return dialog;
      } else {
        dialog.setModalityType(modalType);
        return dialog;
      }
    }

    if (parent instanceof java.awt.Dialog) {
      Dlg_chat dialog = dialogContainer.get(parent);

      if (dialog == null) {
        dialog = new Dlg_chat((java.awt.Dialog) parent, false);
        dialog.setModalityType(modalType);
        dialogContainer.put(parent, dialog);
        java.util.logging.Logger.getAnonymousLogger()
            .log(Level.INFO, "instances: {0}", dialogContainer.size());
        dialog.setThisRef(dialog);
        return dialog;
      } else {
        dialog.setModalityType(modalType);
        return dialog;
      }
    }

    return null;
  }
Exemplo n.º 3
0
 public void nullify() {
   myRef.setVisible(false);
   myRef = null;
 }