Mega Code Archive

 
Categories / Java by API / Javax Swing
 

New JTextArea(String text)

import javax.swing.JTextArea; public class Main {   public static void main(String[] argv) {     // Create a text area with some initial text     JTextArea textarea = new JTextArea("Initial Text");     int rows = 20;     int cols = 30;     textarea = new JTextArea("Initial Text", rows, cols);   } }