Create text field for salary value using JFormattedTextField - Java Swing

Java examples for Swing:JFormattedTextField

Introduction

The following code create text field for salary value.

Demo Code

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
}

Related Tutorials