/** Creates new form UserManagerDialog */
  public WorkerManagerDialog(java.awt.Frame parent, boolean modal) {
    super(parent, modal);
    initComponents();
    this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    this.setIconImage(ImageIconUtil.getFrameIcon("pics/worker_list.png"));
    this.setResizable(false);
    setTitle("员工花名册");
    this.setFont(new java.awt.Font("宋体", 0, 14));

    this.addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            if (workerManagerPanel1.getSaveButton().isEnabled()) { // 存在未保存的修改
              int a =
                  JOptionPane.showConfirmDialog(
                      null, "有未保存的修改,确定关闭吗?", "温馨提示", JOptionPane.YES_NO_OPTION);
              if (a == 0) {
                dispose();
              }
            } else {
              dispose();
            }
          }
        });
  }
 /** Creates new form RegisterUserDialog */
 public RegisterUserDialog(java.awt.Frame parent, boolean modal) {
   super(parent, modal);
   initComponents();
   this.setIconImage(ImageIconUtil.getFrameIcon("pics/register.png"));
   this.setFont(new java.awt.Font("宋体", 0, 14));
 }