Set Tooltip for JLabel - Java Swing

Java examples for Swing:JLabel

Description

Set Tooltip for JLabel

Demo Code


import javax.swing.JApplet;
import javax.swing.JLabel;
 
public class Main {
       //from  w  w  w.jav a2s  .  co m
        public void init(){
               
                JLabel label1 = new JLabel("JLabel Set Tooltip Example");
                       
                label1.setToolTipText("Demo Tooltip for JLabel");
        }
}

Related Tutorials