Source Code : Accepting Formatted Input

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Accepting Formatted Input

Accepting Formatted Input
   
import java.awt.BorderLayout;
import java.awt.Container;
import java.util.Date;

import javax.swing.JFormattedTextField;
import javax.swing.JFrame;

public class FormattedTest {
  public static void main(String args[]) {
    JFrame frame = new JFrame("Formatted");
    Container contentPane = frame.getContentPane();
    JFormattedTextField ftf1 = new JFormattedTextField(new Integer(0));
    contentPane.add(ftf1, BorderLayout.NORTH);
    JFormattedTextField ftf2 = new JFormattedTextField(new Date());
    contentPane.add(ftf2, BorderLayout.SOUTH);
    frame.setSize(200, 100);
    frame.show();
  }
}
           
         
    
    
  

Thank with us