Java tutorial
import javax.swing.JLabel; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { JLabel label = new JLabel("Username :", JLabel.RIGHT); label.setToolTipText("A tool tip with me!"); JOptionPane.showMessageDialog(null, label); } }