import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class HtmlToolTipDemo extends JPanel {
public static void main(String[] a) {
JFrame mainFrame = new JFrame();
JLabel label = new JLabel("label");
label.setToolTipText("First line
Second Line");
mainFrame.getContentPane().add(label);
mainFrame.setSize(100, 100);
mainFrame.setVisible(true);
}
}