Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Label text italicizes the second line

import javax.swing.JButton; public class Main {   public static void main(String[] argv) throws Exception {     JButton button = new JButton();     button.setText("<html>" + "This is a" + "<br><i>" + "swing button"         + "</i></html>");   } }