@Override
      public void actionPerformed(ActionEvent e) {
        if (!popup.isPopupFocused() || !popup.selectFirst(false)) {
          if (e.getSource() instanceof JTextField textField) {
            textField.setCaretPosition(0);
          }
        }
      }
@Override
      public void actionPerformed(ActionEvent e)