title: How to take date in Text field
body: <p>I am new to Java and I'm having trouble getting the date format for a <code>Textfield</code>. I'd like to take the date input by the user and input it into a database. I've tried using <code>JCalender</code> but it's not working because I failed to configure the palette. Are there any other options other than <code>JCalender</code>? Thanks in advance.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>// Delivery Date Action
  
                tf3.addKeyListener(new KeyAdapter() {
      public void keyTyped(KeyEvent e) {
        char c = e.getKeyChar();
        if (!((c &gt;= '0') &amp;&amp; (c &lt;= '9') ||
           (c == KeyEvent.VK_BACK_SPACE) ||
           (c == KeyEvent.VK_DELETE) || (c == KeyEvent.VK_SLASH)))        
        {
          JOptionPane.showMessageDialog(null, "Please Enter Valid");
          e.consume();
        }
      }
    });
  
  
          tf3.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e)
              {
                 int i = Integer.parseInt(tf3.getText());
  
  
              }
  </code></pre>