numberField = new JFormattedTextField (NumberFormat.getInstance ());
Учебник по форматированному текстовому полю