/* Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This code is for educational purposes only. Use at own risk.*/

1. import java.applet.Applet

2. import java.awt.* ; 

3.  

4. public class TxAr 

5.     extends Applet 

6.

7.   TextArea ta ;    

8.  

9.   public TxAr () 

10.   { 

11.     ta = new TextArea ( "This is a TextArea" , 4, 20 ) ;    

12.   } 

13.  

14.   public void init() 

15.   { 

16.     ta.append ("\n") ;    

17.     ta.append ("Uno") ;   

18.     ta.append ("\n") ; 

19.     ta.append ("Due") ; 

20.      

21.     ta.append ("\nTre") ; 

22.      

23.     add ( ta ) ; 

24.  

25.     setBackground ( Color.orange ) ; 

26.  

27.     validate () ; 

28.   } 

29.  

30.