Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!nntpspool01.opticnetworks.net!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Gulp® <gulp@hotmail.it> |
| Newsgroups | it.comp.java |
| Subject | Re: importi giustificati a destra |
| Date | Mon, 5 Oct 2015 18:59:07 +0200 |
| Organization | Aioe.org NNTP Server |
| Lines | 35 |
| Message-ID | <muuadj$8fd$1@speranza.aioe.org> (permalink) |
| References | <muu5lr$s1h$1@speranza.aioe.org> <muu9hm$6fd$1@speranza.aioe.org> |
| NNTP-Posting-Host | 1bvCKAzv6qE+J6fRhFiucA.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.3.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com it.comp.java:8579 |
Show key headers only | View raw
Il 05/10/15 18:46, Dr.UgoGagliardelli ha scritto: > Il 05.10.2015 17.37, Gulp® ha scritto: >> Dovrei stampare incolonnando degli importi e destra. >> Come si fa a giustificare degli importi a destra? >> >> In visulbasic ricavavo la larghezza in mm della stringa di testo e la >> sottraevo alla coordinata x. >> In Java? >> > Ad esempio in un JTextField? No non un JTextfiled. Devo giustificare a destra una serie di importi, ma per una stampa su carta. String cod=txtCod[i].getText(); String des=txtDescrizione[i].getText(); String qt=txtQuantita[i].getText(); String imp=txtImportoriga[i].getText(); g2d.drawString(cod, 35,y); g2d.drawString(des, 95, y); g2d.drawString(qt, 440, y); g2d.drawString(imp, 510, y); Ma l'ultima riga di codice dovrebbe essere modificata per ottenere un allineamento a destra dei numeri di importo, quindi quel 510 non dovrebbe essere tale ma 510- la larghezza di imp. Come scrivevo a 4ndre4 in basic sarebbe: Printer.CurrentX = 510 - Printer.TextWidth(imp) -- Gulp® (forse mi sono perso qualcosa :))
Back to it.comp.java | Previous | Next — Previous in thread | Next in thread | Find similar
importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 17:37 +0200
Re: importi giustificati a destra 4ndre4 <a.laforgia@gmail.com> - 2015-10-05 08:49 -0700
Re: importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 17:57 +0200
Re: importi giustificati a destra "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-05 18:46 +0200
Re: importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 18:59 +0200
Re: importi giustificati a destra 4ndre4 <a.laforgia@gmail.com> - 2015-10-05 10:36 -0700
Re: importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 20:46 +0200
Re: importi giustificati a destra "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-05 19:54 +0200
Re: importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 20:36 +0200
Re: importi giustificati a destra "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-06 06:57 +0200
Re: importi giustificati a destra Gulp® <gulp@hotmail.it> - 2015-10-05 20:44 +0200
Re: importi giustificati a destra Delta11 <delta11NSP@email.it> - 2015-10-05 21:13 +0200
Re: importi giustificati a destra "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-06 07:15 +0200
Re: importi giustificati a destra Delta11 <delta11NSP@email.it> - 2015-10-06 09:09 +0200
Re: importi giustificati a destra "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-06 17:00 +0200
Re: importi giustificati a destra 4ndre4 <a.laforgia@gmail.com> - 2015-10-06 08:50 -0700
csiph-web