|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
[Java]Testo a capo
Ho un problema con il testo, devo stampare il testo sulla mia finestra e attualmente uso questo per farlo:
Codice:
JLabel label_trama = new JLabel("Trama: ");
label_trama.setPreferredSize(new Dimension(200,100));
Mi hanno suggerito di usare la proprietà wordwrap ma non riesco a "settarla". Qualcuno puo darmi una mano? Ps. il testo da inserire è un pezzo di trama. |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Quote:
La soluzione più veloce è quella di usare l'HTML, cioè di mettere il testo come "<html>tuo testo</html>". Ma se vuoi potresti anche usare una JTextArea "camuffata" da JLabel.
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
a me nn interessa cosa usare
|
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Nov 2005
Città: Reggio Emilia
Messaggi: 817
|
Hum, però, se uno volesse fare l'acapo automatico, non mi risulta che l'HTML faccia l'acapo automatico
__________________
FISSO:Athlon BE-2350,CoolerMaster TmgA2(ventola enermax warp 9 cm),4 giga ddr2-800,asus M3A(chipset passivo),WD320gig,Nv7200 passiva,Corsair TX650w...W il silenzio NOTEBOOK:Acer TM 4102wlmi,centrino740 1.73 ghz,x700 64mb,160 giga hd WD ,2gig ddr2 533 dual channel NOTEBOOK2:Asus X5DIN-SX035C,Lcd15'' C2DuoT6500, 4GB DDR2, Nvida G102M 512MB Dedic |
|
|
|
|
|
#5 | |
|
Senior Member
Iscritto dal: Oct 2007
Città: Padova
Messaggi: 4131
|
Quote:
__________________
As long as you are basically literate in programming, you should be able to express any logical relationship you understand. If you don’t understand a logical relationship, you can use the attempt to program it as a means to learn about it. (Chris Crawford) |
|
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Nov 2005
Messaggi: 2787
|
Ma andbin è scomparso?
|
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Oct 2007
Città: Padova
Messaggi: 4131
|
__________________
As long as you are basically literate in programming, you should be able to express any logical relationship you understand. If you don’t understand a logical relationship, you can use the attempt to program it as a means to learn about it. (Chris Crawford) |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:42.




















