package AWT;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Frame;
import java.awt.TextArea;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class TextAreaTest {
public static void main(String[] args) {
Frame f=new Frame();
f.setSize(300,200);
f.setLayout(new FlowLayout());
TextArea ta=new TextArea("Escribe aqui..",5,15);
ta.setFont(new Font("Sanserief",Font.BOLD,14));
ta.setBackground(Color.green);
f.add(ta);
f.setVisible(true);
f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
}
}
No hay comentarios:
Publicar un comentario