2012-02-10 13 views

risposta

3

È possibile utilizzare HTML in JLabels, quindi questo dovrebbe funzionare:

JLabel lbl = new JLabel("<html><span style='color: blue;'>My</span> <span style='color: red;'>Text</span></html>"); 
4

Prova con html:

String labelText = 
    "<html><FONT COLOR=BLUE>My</FONT>" + 
    "<FONT COLOR=RED>Text</FONT></html>"; 
JLabel lbl = new JLabel(labelText); 
Problemi correlati