private void manualInActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_manualInActionPerformed String strId = manualInput.getText(); if (isId(strId)) { int id = getId(); if (isIdFound(id)) { int personId = getPersonId(id); if (!isLoggedIn(id)) { logIn(personId); manualInput.setText(""); } else { MessageBox.infoBox("Error: Already Logged In", "Error"); } } } } // GEN-LAST:event_manualInActionPerformed
private void manualInputKeyTyped( java.awt.event.KeyEvent evt) { // GEN-FIRST:event_manualInputKeyTyped // TODO add your handling code here: String strId = manualInput.getText(); // System.out.println(evt.getKeyCode()); if (evt.getKeyChar() == '\n') { if (isId(strId)) { int id = getId(); if (isIdFound(id)) { int personId = getPersonId(id); if (!isLoggedIn(id)) { logIn(personId); manualInput.setText(""); } else { logOut(personId); manualInput.setText(""); } } } } } // GEN-LAST:event_manualInputKeyTyped