๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17415

Re: Put TextField values into float Variable

#17415
From: torsten.welches
Date: Thu, 19 Nov 1998 00:00
23 lines
1354 bytes
float result = 0.0f;
try {
  result = new Float(textfield.getText()).floatValue;
} catch (NumberFormatException textIsNotAValidFloat) {...}

good luck
Torsten Welches
debis Systemhaus

In article <sNG42.175$7u3.1039@news1.cityweb.de>,
  "Timo Schn๏ฟฝlzer" <schnoelzer@cityweb.de> wrote:
> How can I put a Value from a Textfield into a float var? Using Delphi the
> Syntax "strtofloat" or name.asfloat works. How to do this in JAVA???
> Was trying for nights!
>
> Thanks for help!
>
> Timo
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <730m0o$r5q$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <sNG42.175$7u3.1039@news1.cityweb.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,b3b4e3f2db431469
X-Google-Attributes: gidf74b3,public
From: torsten.welches@gerling.de
Subject: Re: Put TextField values into float Variable
Date: 1998/11/19
Message-ID: <730m0o$r5q$1@nnrp1.dejanews.com>
X-Deja-AN: 413433849
References: <sNG42.175$7u3.1039@news1.cityweb.de>
X-Http-Proxy: 1.0 tidecgn0002:81, 1.0 x4.dejanews.com:80 (Squid/1.1.22) for client 193.158.55.74
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Thu Nov 19 08:48:27 1998 GMT
Newsgroups: borland.public.jbuilder.java.language
X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.02; Update a; AK; Windows NT)