Fix [ 1759771 ] Parse exception when you enter ".." in a numeric field

Accepted solution from arboleda
This commit is contained in:
Carlos Ruiz 2008-03-16 00:36:38 +00:00
parent 5e02efd9cb
commit 1cde9a356a
1 changed files with 5 additions and 0 deletions

View File

@ -360,6 +360,11 @@ public final class VNumber extends JComponent
}
if (value.equals(".") || value.equals(",") || value.equals("-"))
value = "0";
// arboleda - solve bug [ 1759771 ] Parse exception when you enter ".." in a numeric field
if (value.equals("..")) {
value = "0";
m_text.setText(".");
}
try
{
Number number = m_format.parse(value);