public InOut() {
    sdf = new SimpleDateFormat("HH:mm:ss");
    list = new ArrayList<Attendance>();
    // reading data in list
    try {
      list = AttendanceStorge.readingFromUserAttendanceDB();
    } catch (Exception e) {
      JOptionPane.showMessageDialog(btnintime, "File not found");
    }

    // GUI INTERFACE
    btnadimlogin = new JButton("      Work as Admin      ");
    btninfo = new JButton("Employee Information");
    btnintime = new JButton("IN Time");
    btnchangepass = new JButton("Change Password");
    btnintime.setMaximumSize(btninfo.getMaximumSize());
    btnouttime = new JButton("OUT Time");
    btnchangepass.setMaximumSize(btninfo.getMaximumSize());
    btnouttime.setMaximumSize(btninfo.getMaximumSize());
    btnleaverequest = new JButton("Leave Request");
    btnleaverequest.setMaximumSize(btninfo.getMaximumSize());
    boxbutton = Box.createVerticalBox();
    boxbutton.add(Box.createRigidArea(new Dimension(60, 20)));
    boxbutton.add(btnintime);
    boxbutton.add(Box.createRigidArea(new Dimension(60, 20)));
    boxbutton.add(btnouttime);
    boxbutton.add(Box.createRigidArea(new Dimension(60, 20)));
    boxbutton.add(btnleaverequest);
    boxbutton.add(Box.createRigidArea(new Dimension(60, 20)));
    boxbutton.add(btnchangepass);
    boxbutton.add(Box.createRigidArea(new Dimension(60, 20)));
    boxbutton.add(btnadimlogin);

    btnintime.addActionListener(this);
    btnouttime.addActionListener(this);
    btnleaverequest.addActionListener(this);
    btnchangepass.addActionListener(this);
    btnadimlogin.addActionListener(this);
    add(boxbutton, BorderLayout.CENTER);
    setSize(240, 290);
    setVisible(true);
    setTitle("ATTENDENCE");
    setLocationRelativeTo(null);
    setResizable(false);

    // button enable check
    initialdata();
  }
  /**
   * Constructs a new modal {@code FileCrypter}.
   *
   * @param encrypt Whether to encrypt or decrypt the files
   * @param files The files to encrypt or decrypt
   * @see #init()
   */
  private FileCrypter(boolean encrypt, @Nullable VFSFile... files) {
    super(
        jEdit.getActiveView(),
        jEdit.getProperty(encrypt ? "cipher.file-encrypter.title" : "cipher.file-decrypter.title"),
        true);

    this.encrypt = encrypt;
    this.files = files;

    cipherOptionPane = new CipherOptionPane(false, false);

    newFileHandlingLabel =
        new JLabel(jEdit.getProperty("cipher.file-crypter.new-file-handling.label"));

    Dimension dim = new Dimension(20, 0);
    firstColumnFiller = new Filler(dim, dim, dim);
    directoryFiller = new Filler(dim, dim, dim);
    suffixFiller = new Filler(dim, dim, dim);

    overwriteRadioButton =
        new JRadioButton(jEdit.getProperty("cipher.file-crypter.overwrite.label"), false);
    dim = overwriteRadioButton.getMaximumSize();
    dim.width = Integer.MAX_VALUE;
    overwriteRadioButton.setMaximumSize(dim);
    newFileHandlingLabel.setLabelFor(overwriteRadioButton);

    otherDirectoryRadioButton =
        new JRadioButton(jEdit.getProperty("cipher.file-crypter.other-directory.label"), false);
    dim = otherDirectoryRadioButton.getMaximumSize();
    dim.width = Integer.MAX_VALUE;
    otherDirectoryRadioButton.setMaximumSize(dim);

    directoryLabel = new JLabel(jEdit.getProperty("cipher.file-crypter.directory.label"));

    directoryTextField = new JTextField(jEdit.getProperty("options.cipher.file-crypter.directory"));
    directoryTextField.setEditable(false);
    directoryTextField.setColumns(25);
    directoryTextField.setCaretPosition(0);
    directoryLabel.setLabelFor(directoryTextField);

    chooseDirectoryButton =
        new JButton(jEdit.getProperty("cipher.file-crypter.choose-button.label"));
    dim = chooseDirectoryButton.getMaximumSize();
    dim.height = Integer.MAX_VALUE;
    chooseDirectoryButton.setMaximumSize(dim);

    suffixRadioButton =
        new JRadioButton(jEdit.getProperty("cipher.file-crypter.suffix-radio-button.label"), false);
    dim = suffixRadioButton.getMaximumSize();
    dim.width = Integer.MAX_VALUE;
    suffixRadioButton.setMaximumSize(dim);

    suffixLabel = new JLabel(jEdit.getProperty("cipher.file-crypter.suffix.label"));

    suffixTextField = new JTextField(jEdit.getProperty("options.cipher.file-crypter.suffix"));
    suffixTextField.setColumns(25);
    suffixTextField.setCaretPosition(0);
    suffixLabel.setLabelFor(suffixTextField);

    cryptButton =
        new JButton(
            jEdit.getProperty(
                encrypt
                    ? "cipher.file-crypter.encrypt-button.label"
                    : "cipher.file-crypter.decrypt-button.label"));
    dim = cryptButton.getMaximumSize();
    dim.width = Integer.MAX_VALUE;
    cryptButton.setMaximumSize(dim);
    getRootPane().setDefaultButton(cryptButton);

    NewFileHandling newFileHandling =
        Enum.valueOf(
            NewFileHandling.class,
            jEdit.getProperty("options.cipher.file-crypter.new-file-handling", "OVERWRITE"));
    switch (newFileHandling) {
      case OVERWRITE:
        overwriteRadioButton.setSelected(true);
        break;

      case OTHER_DIRECTORY:
        otherDirectoryRadioButton.setSelected(true);
        break;

      case SUFFIX:
        suffixRadioButton.setSelected(true);
        break;

      default:
        throw new InternalError("missing case branch for NewFileHandling: " + newFileHandling);
    }

    ButtonGroup buttonGroup = new ButtonGroup();
    buttonGroup.add(overwriteRadioButton);
    buttonGroup.add(otherDirectoryRadioButton);
    buttonGroup.add(suffixRadioButton);

    setLayout(new ExtendedGridLayout(5, 5, new Insets(5, 5, 5, 5)));

    add(cipherOptionPane, new ExtendedGridLayoutConstraints(0, 5, 1, cipherOptionPane));

    add(newFileHandlingLabel, new ExtendedGridLayoutConstraints(1, 5, 1, newFileHandlingLabel));

    add(firstColumnFiller, new ExtendedGridLayoutConstraints(2, 1, 5, firstColumnFiller));

    add(overwriteRadioButton, new ExtendedGridLayoutConstraints(2, 4, 1, overwriteRadioButton));

    add(
        otherDirectoryRadioButton,
        new ExtendedGridLayoutConstraints(3, 4, 1, otherDirectoryRadioButton));

    add(directoryFiller, new ExtendedGridLayoutConstraints(4, directoryFiller));
    add(directoryLabel, new ExtendedGridLayoutConstraints(4, directoryLabel));
    add(directoryTextField, new ExtendedGridLayoutConstraints(4, directoryTextField));
    add(chooseDirectoryButton, new ExtendedGridLayoutConstraints(4, chooseDirectoryButton));

    add(suffixRadioButton, new ExtendedGridLayoutConstraints(5, 4, 1, suffixRadioButton));

    add(suffixFiller, new ExtendedGridLayoutConstraints(6, suffixFiller));
    add(suffixLabel, new ExtendedGridLayoutConstraints(6, suffixLabel));
    add(suffixTextField, new ExtendedGridLayoutConstraints(6, 2, 1, suffixTextField));

    add(cryptButton, new ExtendedGridLayoutConstraints(7, 5, 1, cryptButton));
  }