@Override
      public void actionPerformed(ActionEvent e) {
        popup.hide();
        if (e.getSource() instanceof JTextField textField) {
          textField.setCaretPosition(textField.getCaretPosition());
        }
      }
@Override
      public void actionPerformed(ActionEvent e)