Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.java > #8559

sommare valori da JTextField

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From Gulp® <gulp@hotmail.it>
Newsgroups it.comp.java
Subject sommare valori da JTextField
Date Tue, 29 Sep 2015 09:48:45 +0200
Organization Aioe.org NNTP Server
Lines 25
Message-ID <mudfum$q7v$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host B29lDxYziyeAWnt1ZYlrLg.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
X-Notice Filtered by postfilter v. 0.8.2
X-Mozilla-News-Host news://news.readfreenews.net:119
Xref csiph.com it.comp.java:8559

Show key headers only | View raw


C'è qualcosa di sbagliato in questo codice?

  private void Somma(){
       double sum =0;
       double imp=0;
       String num;
       for (int i=0;i<13;i++){
         num=txtImportoriga[i].getText();
         if (num.length()>0){
             //imp=Double.valueOf(num);
             imp=parseDouble(num);
         }
         else{
             imp=0;
         }
        sum=sum + imp;
        txtTotale.setText(Uty.StrFormattaCur(sum,false));
     }
     }

Alcuni txtImportoriga hanno stringa: ""

-- 
Gulp®
(forse mi sono perso qualcosa :))

Back to it.comp.java | Previous | NextNext in thread | Find similar


Thread

sommare valori da JTextField Gulp® <gulp@hotmail.it> - 2015-09-29 09:48 +0200
  Re: sommare valori da JTextField "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-09-29 12:22 +0200
    Re: sommare valori da JTextField Gulp® <gulp@hotmail.it> - 2015-09-29 15:12 +0200

csiph-web