I was reading in Graphica Java 2 last night that a calculator is
currently sitting in the javax.swing.pending package, all things there
are being evaluated for a next release. And I think 1.3 will support it.
If what you are talking about is have to behave like a spreadsheet, would
it be possible to add a listener to that JTextField so when focus is
lost, it will compute the current equation and give a result in the box?

-Riyad

Joost Helberg wrote:

> Hi,
>
> I'm developing a system for small IT businesses and I need to enter
> numbers into fields.
>
> Currently I use a JTextField to enter the number into, converting it
> to Integer or Double when needed.
>
> I want to implement a speciliazed version of JTextField which will
> evaluate integer expressions.
>
> So entering
>     (3 * 14 + 2) / (5+6)
>
> will display (upon leaving the field)
>      4
>
> Anyone familiar with Open Source Code to (partly) implement this?
>
> Joost Helberg
>
> PS: I don't understand why not all number-entering fields in all
> applications support this. It is so obvious! Applications with a
> pop-up calculator are so improductive!
>
> THANKS in advance
>
> --
> Joost Helberg                      Unix consultants      v   v
> [EMAIL PROTECTED]                       OO developers         \ /
>                                  ###   ##    ##  #     >---X---<
> http://snow.nl                  #     #  #  #  # #  #  #  / \
> Snow B.V.                        ##   #  #  #  # #  #  # ^   ^
> Tel. 0418-653333                   #  #  #  #  # #  #  #
> Fax. 0418-653666                ###   #  #   ##   ## ##
> PGP PblKey fprnt=4D BD 6A 45 6A 86 81 59  0D BA 7D D4 B2 F8 63 34
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

--
[      Riyad Kalla      ]
[   [EMAIL PROTECTED]   ]
[       CS - Major      ]
[ University of Arizona ]




----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to