title: Taking value in the Maskformater
body: <p>I have wrote a program for taking IP address<code>(Ex. 172.16.10.0)</code>. I am using Maskformatter but dont how take the value from the Maskformatter.</p>
  
  <pre><code>try {
      MaskFormatter mf = new MaskFormatter(mask);
      JFormattedTextField txtIP = new JFormattedTextField(mf);
      panIP.add(txtIP);
      txtIP.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
      txtIP.setPreferredSize( new Dimension( 150, 24 )); 
  } catch (ParseException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>How can I pass the value<code>(Ex.172.16.10.0)</code> that is taking in the textfield to another string variable?</p>