Some Swing components (labels, buttons, menu items, tabbed panes, tool tips) allows the users to specify the tet as HTML. The components displays the text according to HTML specified accordingly.

Java Code:
JButton jb = new JButton("<html><b><i>Hello World!</i></b></html>");