code: public static MouseAdapter mouseClicked(@NonNull Consumer<MouseEvent> consumer) {
        return new MouseAdapter() {
           @Override
           public void mouseClicked(MouseEvent e) {
              consumer.accept(e);
              super.mouseClicked(e);
           }
        };
     }
docs: Mouse clicked mouse adapter.
  
  @param consumer the consumer
  @return the mouse adapter