Html tooltips : Tooltip « Swing JFC « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » Swing JFC » Tooltip 




Html tooltips
Html tooltips
   
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("<html>First line<br>Second Line</html>");
    mainFrame.getContentPane().add(label);

    mainFrame.setSize(100100);

    mainFrame.setVisible(true);

  }
}


           
         
    
    
  














Related examples in the same category
1.Tooltip SampleTooltip Sample
2.Working with Tooltip TextWorking with Tooltip Text
3.MultiLine ToolTip ExampleMultiLine ToolTip Example
4.Colored ToolTip ExampleColored ToolTip Example
5.Disable / enable application tool tips
6.Making Tool Tips Remain Visible
7.Enabling and Disabling Tool Tips
8.Making Tool Tips Appear Immediately
9.Use the default tool tip location
10.Make a tool tips appear immediately
11.Showing an Image in a Tool Tip with HTML
12.Setting a Tool Tip
13.Setting the Location of a Tool Tip
14.By default, the lines are left justified. Center the lines.
15.Set the location of the tool tip such that its nw corner coincides with the bottom center of the button
16.Showing an Image in a ToolTip
17.Modify the behaviour of the default JToolTip
18.Italicize the second line
19.Changing ToolTip background color for Swing Applications
20.ToolTip Location ExampleToolTip Location Example
21.Set a tool tip for swing component
22.JToolTip With Icon
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.