import java.awt.Font;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
/*
 * JTextAreaExample.java
 *
 * Created on January 16, 2005, 3:37 PM
 */

/**
 * 
 * @author Bill Kraynek
 */
public class JTextAreaExample {
    
    /** Creates a new instance of JTextAreaExample */
    public JTextAreaExample() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // A JTextArea is a GUI for text
        // The constructor creates one with 20 rows and 40 columns
        JTextArea outArea = new JTextArea(20,40);
        outArea.setFont(new Font("New Times Roman",Font.BOLD+Font.ITALIC,30));
        String out = "\tLast Name\t\tFirst Name\n\n";
        out += "\tKraynek\t\tBill\n";
        out += "\tO'Neal\t\tShaquille\n";
        out += "\tWade\t\tDwayne\n";
        out += "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        outArea.setText(out);
        // Putting a JTextArea inside a JScrollPane provides scroll bars if necessary
        JOptionPane.showMessageDialog(null,new JScrollPane(outArea));
    }
    
}

