Java: Souligner le texte d’un JLabel

Author:

 int,string,char,static, url, socket, url, socket, java
{filelink=23}


  import java.awt.FlowLayout; 
  import javax.swing.JFrame; 
  import javax.swing.JLabel; 
  import javax.swing.SwingConstants;
  import java.awt.Font;
  
  public class UJLabel extends JFrame
  {
  	public UJLabel()
  	{    
    setSize( 275, 180 );   		
    setLayout( new FlowLayout() ); 
    JLabel lblText = new JLabel();
    // Souligner le texte de JLabel
    lblText.setText("Exemple JLabel souligné:" );
    lblText.setToolTipText( lblText.getText() );
    add( lblText );
  	}
  	public static void main (String[] args) {
  		JFrame frameLabel=new UJLabel();
  		frameLabel.setTitle("Attributs des JLabels JLabel");
  		frameLabel.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  		frameLabel.setVisible(true);
}
  }

A Voir sur le même Sujet:

  • java swing exemple creation pdf
  • code+execution+bouton+somme+jframe
  • télécharger codes sources swing de java
  • swing java comment envoyer des fichiers
  • java: masquer une jframe
  • code source java swing
  • swing
  • cours swing java
  • code source interface swing java
  • afficher contenu fichier dans jframe

Leave a Reply

Your email address will not be published. Required fields are marked *