🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1317

Re: decimal separator ',' or '.'

#1317
From: Serkan
Date: Sat, 03 Jan 2004 18:41
24 lines
1983 bytes
Hi
> You do not show the code or even say which methods you used.  It is
> hard to tell what your problem is without that.

    I was using format method of a java.text.DecimalFormat object for
formatting and Double.parseDouble for parsing

> The Java libraries provide both locale-specific and locale-independent
> formatting and parsing methods.  That makes a *lot* of sense, since
> both are sometimes required.

    As I said that's my oponion, that's all. I had said " I would also like
to learn if there is another way that I don't know." in my first message,
and I still want to learn.


> It sounds like you are using a locale-specific method for formatting
> and a locale-independent method for parsing.

    I had to format the numbers formatted using the current locale to the
user and parse these numbers into doubles after the user modifies the data.

Regards
Serkan
Technical Details
Message-ID: <3ff709d1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ff59168@newsgroups.borland.com> <3ff5f035@newsgroups.borland.com> <3ff6dace@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c8a77c3c06d158b1
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-01-03 10:35:24 PST
From: "Serkan" <serkan@insaat.org>
Newsgroups: borland.public.jbuilder.java.swing
References: <3ff59168@newsgroups.borland.com> <3ff5f035@newsgroups.borland.com> <3ff6dace@newsgroups.borland.com>
Subject: Re: decimal separator ',' or '.'
Date: Sat, 3 Jan 2004 20:41:37 +0200
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300
NNTP-Posting-Host: 195.174.146.35
Message-ID: <3ff709d1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1073154513 195.174.146.35 (3 Jan 2004 10:28:33 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail