Html embebido en componentes Swing
En el texto mostrado en JLabel, JButton, etc es posible poner texto html para conseguir ciertos efectos. De hecho, es la única forma, por ejemplo, de conseguir texto en dos líneas. Lo siguiente puede ser un ejemplo
JLabel etiqueta = new JLabel ("<html>Hola<br>mundo</html>");
También sería posible conseguir negritas, cursivas, etc.
Enlaces externos[editar]
- El tutorial de sun sobre el tema : http://docs.oracle.com/javase/tutorial/uiswing/components/html.html
- En mi diario : http://chuidiang.blogspot.com/2005/08/using-html-in-swing-components.html