title: Java Swing GUI: How to do a field that stores a keybind for a specific function and that - when clicked on it- asks for a key?
body: <p>sorry if the title is confusing but I just want something like in this video at 00:25
  <a href="https://www.youtube.com/watch?v=ReoXncADFFw&amp;t=819s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ReoXncADFFw&amp;t=819s</a>
  I know I probably have to use keylistener and mouseadapter on a textfield or something but there are more things like: how do I do it that the field is not editable and can onlny be clicked like in the video etc?
  I would appreciate your help very much :)! This is the last step for my gui to be complete :)</p>