Java: Souligner le texte de JLabel

Author:

 int,string,char,static, url, socket, url, socket, java
Download

import javax.swing.*;
 
public class JLabelSouligne extends JFrame
{
 
    public JLabelSouligne() 
    {
    	JPanel pnl=new JPanel();
    	JLabel label=new JLabel();
 
    	// Souligner le texte
    	label.setText("<html><body><u>Nom</u></body></html>");
    	pnl.add(label);
    	add(pnl);
    }
 
    public static void main (String[] args) 
    {
    	JLabelSouligne obj=new JLabelSouligne();
    	obj.setTitle("Exemple de mise en forme");
    	obj.setDefaultCloseOperation(obj.EXIT_ON_CLOSE);
    	obj.setSize(150,200);
    	obj.setVisible(true);
    }
 
 
}

Cet article Java: Souligner le texte de JLabel est apparu en premier sur .