I'm using the code snippet below to create a JFormattedTextField. When entering values via the GUI text field the formatting works as expected. However, when I programmatically set the value the formatting does not occur. How can I force this to occur?
JFormattedTextField myTextField = new JFormattedTextField(new DecimalFormat("#0.###"));
// Formatting Does Not Occur
myTextField.setText("555.55555");