title: How To limit the number of characters in JTextField?
body: <p>How to limit the number of characters entered in a JTextField?</p>
  
  <p>Suppose I want to enter say 5 characters max. After that no characters can be entered into it.</p>