Article View: borland.public.jbuilder.java.language
Article #17270Re: TextField to double
From: Nikolaos Giannopoulos
Date: Mon, 23 Nov 1998 00:00
Date: Mon, 23 Nov 1998 00:00
21 lines
1132 bytes
1132 bytes
double d1 = (new Double(textfield1.getText())).doubleValue(); ... textfield1.setText(new Double(d1)); I'm not sure about the syntax but it should work. Basically you need to take your String object to a Double object (not a double type) and then manipulate it from there. --Nikolaos Jan Piessens wrote: > Hi, > > I need the value of a textfiels to convert to a double. Then i must do > some calculations and display the new value back in the text field. > Can someone help me ? > > Thanks > Jan Piessens
Technical Details
Message-ID:
<3659C1EC.4E6CD23D@solmar.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36553F54.7F11A9C8@innet.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,77e9ec1250b1d181 X-Google-Attributes: gidf74b3,public From: Nikolaos Giannopoulos <nikolaos@solmar.ca> Subject: Re: TextField to double Date: 1998/11/23 Message-ID: <3659C1EC.4E6CD23D@solmar.ca> X-Deja-AN: 414904850 Content-Transfer-Encoding: 7bit References: <36553F54.7F11A9C8@innet.be> To: Jan Piessens <janp@innet.be> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Solmar Solutions Inc. Mime-Version: 1.0 Reply-To: nikolaos@solmar.ca Newsgroups: borland.public.jbuilder.java.language