Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / April 2004

Tip: Looking for answers? Try searching our database.

Using Arithmetic Evaluator with buttons help

Thread view: 
Richard - 18 Apr 2004 20:09 GMT
Hi I'm making a simple calculator program using Arithmetic Evaluator
and while I can get it to do its stuff when using textfields for data
entry.
But I would like to use buttons for the entry digits but have no idea
how to get the info from the buttons to the evaluatorso it can
calculate the result

does anyoen have any links to tutorials that will cover it
Roedy Green - 18 Apr 2004 21:16 GMT
>But I would like to use buttons for the entry digits but have no idea
>how to get the info from the buttons to the evaluatorso it can
>calculate the result

Each button needs an event handler that takes the digit and append it
to the display field value, and redisplays that result.

You might write a program to write the source code for a program in a
pedestrian way, or use an ARRAY of button objects, and generic code to
place the buttons and a common action handler.

For example, take the button number and use the / or % operator to
determine the row/column where it fits.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.