// TODO: do this properly for the fractional values case...
int nColumns = integerValues ? Math.max(nCharsForValue((int) lowerBound), nCharsForValue((int) upperBound)) : 4;
label.setColumns(nColumns);
label.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!ignoreChangeEvents) {
double newValue = Double.parseDouble(label.getText());
if (newValue >= lowerBound && newValue <= upperBound) {
changeValue(newValue);