We would like to know how to create JButton with Multiline Label using HTML.
import javax.swing.JButton; import javax.swing.JOptionPane; /*w w w . ja v a 2 s.c o m*/ public class Main { public static void main(final String args[]) { String label = "<html>" + "This is a" + "<br>" + "swing button" + "</html>"; JButton button = new JButton(label); JOptionPane.showMessageDialog(null, button); } }