private void updated()
    {
        boolean ok = parseString(t.getText());

        if (ok)
        {
            if (hasSavedBorder)
                t.setBorder(savedBorder);
        }
        else
        {
            if (!hasSavedBorder)
            {
                savedBorder = t.getBorder();
                hasSavedBorder = true;
            }
            t.setBorder(BorderFactory.createLineBorder(Color.RED, 2));
        }
    }