I'm trying to take the input of several JTextField's that contain integers and concatenate them into a formatted String (for both display and to be saved). I'm having trouble getting leading zeros into my string. For example, if the first field contains the number '1', I want it to appear as '001' in my String.
I've tried a few things, including the following:
The problem is, of course, that JTextField.getText() returns a String, not an int.
Does anyone know another way to do it?
Thanks,
Jessica