private static void addInputField(JFormattedTextField input,String labelText,java.awt.Container cont,Object initialValue,PropertyChangeListener pcl){
  JLabel label=new JLabel(labelText);
  label.setHorizontalAlignment(JLabel.RIGHT);
  cont.add(label);
  input.setValue(initialValue);
  input.setHorizontalAlignment(JFormattedTextField.RIGHT);
  input.addPropertyChangeListener("value",pcl);
  cont.add(input);
  label.setLabelFor(input);
}

private static void addInputField ( JFormattedTextField input , String labelText , java . awt . Container cont , Object initialValue , PropertyChangeListener pcl ) { JLabel label = new JLabel ( labelText ) ; label . setHorizontalAlignment ( JLabel . RIGHT ) ; cont . add ( label ) ; input . setValue ( initialValue ) ; input . setHorizontalAlignment ( JFormattedTextField . RIGHT ) ; input . addPropertyChangeListener ( "value" , pcl ) ; cont . add ( input ) ; label . setLabelFor ( input ) ; }
utility method that adds a new label and a new input field to the dialog .
