Java tutorial
import java.text.NumberFormat; import javax.swing.JFormattedTextField; public class Main { public static void main(String[] argv) { JFormattedTextField tft1 = new JFormattedTextField(NumberFormat.getIntegerInstance()); tft1.setValue(new Integer(123)); Integer intValue = (Integer) tft1.getValue(); } }