Java examples for Swing:JFormattedTextField
The following code create text field for salary value.
import javax.swing.JFormattedTextField; public class Main { public static void main(String[] args) { JFormattedTextField salaryField = new JFormattedTextField(); salaryField.setValue(new Double(12345.98)); }//from www. j a v a2 s . c o m }