>>> I apologise if this has already been covered.
>>> How would I validate currency input from a JTextField. For example, to
[quoted text clipped - 13 lines]
> I made the change you suggested but unfortunately it still doesn't
> work.
On Jul 28, 3:19 am, Arne Vajh?j <a...@vajhoej.dk> wrote:
> > On Jul 28, 12:56 am, Arne Vajh?j <a...@vajhoej.dk> wrote:
> >>> I apologise if this has already been covered.
[quoted text clipped - 20 lines]
>
> - Show quoted text -
Sorry mate, I was being an arse when I ran a test. Your solution works
perfectly. Thanks for your help mate.
Nigel Wade - 30 Jul 2007 09:50 GMT
>> >>> I apologise if this has already been covered.
>> >>> How would I validate currency input from a JTextField. For example, to
[quoted text clipped - 22 lines]
> Sorry mate, I was being an arse when I ran a test. Your solution works
> perfectly. Thanks for your help mate.
You might also want to consider a JFormattedTextField with a MaskFormatter.
There is a page on how to use these together to validate input in the Swing
tutorial:
<http://java.sun.com/docs/books/tutorial/uiswing/components/formattedtextfield.html>

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555