title: Hide/Show Password in a JTextFIeld (Java Swing)
body: <p>So I've been working on a Password Strength Checker and the way it works is that the user enters some random text into a textfield and then instantaneous visual feedback (breakdown of points) is displayed. I've also added a checkbox, which on being selected, should hide the password i.e. replace all the chars with asterisks, while preserving the actual text input by the user. A document listener is being used to keep track of changes inside the textfield. (each char on entry gets analyzed and then scored) </p>
  
  <p>So, my question is, how exactly do I mask the user input with asterisks preserving its original value?</p>
  
  <p>Here's what the GUI looks like: </p>
  
  <p><a href="http://speedcap.net/sharing/screen.php?id=files/51/2f/512f9abb3f92a25add7c593e9d80e9e4.png">http://speedcap.net/sharing/screen.php?id=files/51/2f/512f9abb3f92a25add7c593e9d80e9e4.png</a></p>