Login    New User    Forgot Password    Help      

Text File

Java Tutorials

Example

// text fields
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code="control8" width=250 height=300>

</applet>
*/
public class control8 extends Applet

{
public void init()

{
String str=" This is the First line in java text field \n"+
" This is the second line of the text field \n" +
" This is the third line \n"+
" This is the last line";
TextArea text=new TextArea(str,25,30);
add(text);
}}


Output

Output in applet

Java Tutorials