Article View: borland.public.jbuilder.java.language
Article #19547Re: Simple Question on textFieldControls
From: Steve Sommers
Date: Wed, 21 Jan 1998 00:00
Date: Wed, 21 Jan 1998 00:00
68 lines
3135 bytes
3135 bytes
--------------29C236B86378C273AD3F9D9A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To the reply from Allan Bressler I would add that it appears you are using int values for your calculation, so instead of Double you will have to use Integer. But the same general solution will work. If you expect to receive non-Integer values in textFieldControl1 then, obviously, the solution offered to Allan will work fine. Dan French wrote: > I want to develop a simple calculation applet that takes user (numeric) > input from a textFieldControl and simply displays the answer in a second > textFieldControl. In other words, in textFieldControl1 the user is to > enter the number of square feet he or she wants to "finish" (this is a > floor finish calculator), and the applet will display the number of gallons > needed for the job in textFieldControl2. > > The equation is simple; textFieldControl1 * 1500 = textFieldControl2. What > is the best way to accomplish this? I can't seem to figure out how to get > integers entered into textFieldControls into math formulas. > > please help > > Dan French > email@macroworks.com --------------29C236B86378C273AD3F9D9A Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <HTML> To the reply from Allan Bressler I would add that it appears you are using <I>int </I>values for your calculation, so instead of Double you will have to use Integer. But the same general solution will work. If you expect to receive non-Integer values in textFieldControl1 then, obviously, the solution offered to Allan will work fine. <P>Dan French wrote: <BLOCKQUOTE TYPE=CITE>I want to develop a simple calculation applet that takes user (numeric) <BR>input from a textFieldControl and simply displays the answer in a second <BR>textFieldControl. In other words, in textFieldControl1 the user is to <BR>enter the number of square feet he or she wants to "finish" (this is a <BR>floor finish calculator), and the applet will display the number of gallons <BR>needed for the job in textFieldControl2. <P>The equation is simple; textFieldControl1 * 1500 = textFieldControl2. What <BR>is the best way to accomplish this? I can't seem to figure out how to get <BR>integers entered into textFieldControls into math formulas. <P>please help <P>Dan French <BR>email@macroworks.com</BLOCKQUOTE> </HTML> --------------29C236B86378C273AD3F9D9A--
Technical Details
Message-ID:
<34C6C625.46F741FF@pop3.concentric.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bd265e$21ab55e0$9d7f85cd@default>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,b923409e270ff821 X-Google-Attributes: gidf74b3,public From: Steve Sommers <ssommers@pop3.concentric.net> Subject: Re: Simple Question on textFieldControls Date: 1998/01/21 Message-ID: <34C6C625.46F741FF@pop3.concentric.net> X-Deja-AN: 318220848 References: <01bd265e$21ab55e0$9d7f85cd@default> Mime-Version: 1.0 Reply-To: ssommers@concentric.net To: Dan French <user@msn.com> Content-Type: multipart/alternative; boundary="------------29C236B86378C273AD3F9D9A" Organization: None Newsgroups: borland.public.jbuilder.java.language