Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication37;
- import java.util.Set;
- import javax.swing.JFrame;
- import javax.swing.JTextPane;
- /**
- *
- * @author leo
- */
- public class JavaApplication37 extends JFrame {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- JTextPane textPane = new JTextPane(); // creates an empty text pane
- textPane.setContentType("text/html"); // lets Java know it will be HTML
- textPane.setText("<u><span style = 'font-size: 20pt'> Big </span ></u>"); // sets its text
- JFrame frame = new JFrame(); // makes a window to put it in
- frame.getContentPane().add(textPane); // adds the text pane to the window
- frame.pack(); // adjusts the window to the right size
- frame.setVisible(true); // makes it show up
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment