X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosConfigFreqUI.java;h=6dcd63b8dcb35624634814897e4b7c1fa2c8e161;hb=debian;hp=6253e3e4c254f1e51e73a0a8d437c7b281642576;hpb=f766a457323268857b3f2dfc7f42427437b71cb7;p=fw%2Faltos diff --git a/altosuilib/AltosConfigFreqUI.java b/altosuilib/AltosConfigFreqUI.java index 6253e3e4..49fe6b40 100644 --- a/altosuilib/AltosConfigFreqUI.java +++ b/altosuilib/AltosConfigFreqUI.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,13 +16,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_6; +package org.altusmetrum.altosuilib_14; import java.awt.*; +import java.text.*; import java.awt.event.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altoslib_6.*; +import org.altusmetrum.altoslib_14.*; class AltosEditFreqUI extends AltosUIDialog implements ActionListener { Frame frame; @@ -51,10 +53,10 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { String d_s = description.getText(); try { - double f_d = Double.parseDouble(f_s); + double f_d = AltosParse.parse_double_locale(f_s); return new AltosFrequency(f_d, d_s); - } catch (NumberFormatException ne) { + } catch (ParseException ne) { } return null; } @@ -65,7 +67,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { got_ok = false; frame = in_frame; - Container pane = getContentPane(); + Container pane = getScrollablePane(); pane.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); @@ -300,7 +302,7 @@ public class AltosConfigFreqUI extends AltosUIDialog implements ActionListener { frequencies = new FrequencyList(in_frequencies); - Container pane = getContentPane(); + Container pane = getScrollablePane(); pane.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints();