 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
skrich Guest
|
Posted: Sat Feb 25, 2006 5:12 pm Post subject: applet |
|
|
public void paint(Graphics gr){
if(prod[0]<=prod[1]){
gr.drawString("il cappuccino è preso con maggior
frequenza",5,60);
}
}
guardare questo pezzetto di codice applet semplicissimo.Come faccio per
farlo andare a capo però prima che inizi a scrivere il
cappuccino.....?tipo la system.out.println.
\n non funzia e deo usare la gr.drawString.
Una curiosità:
finora per le applet abbiamo fatto solo i metodi init,start,graphics.
Se i calcoli le eseguo tutti nell'init,o nel graphics,oppure tutto nel
graphics,oppure tutto nel start teoricamente andrebbe tutto.Perchè allora
suddividere in più metodi?(si chiamano metodi no,init,start e graphics??)
grazie
--
questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse (AT) newsland (DOT) it |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|