Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/12/2004, 08:39
Avatar de goncafa
goncafa
 
Fecha de Ingreso: julio-2002
Ubicación: Santiago
Mensajes: 1.211
Antigüedad: 21 años, 10 meses
Puntos: 10
Código PHP:
//se inician los TextArea
TextArea area = new TextArea();

//se inician los TextField
TextField texto1 = new TextField();
TextField texto2 = new TextField();

//iniciamos los botones
Button borrar = new Button();
Button aceptar = new Button();

/*
   Aqui haces el ingreso de los componentes a la ventana segun sea tu
   configuracion de layout etc etc
*/

//aca hacemos los escuchadores para que hagan lo que quieres
borrar.addActionListener(new ActionListener() {
    public 
void actionPerformed(ActionEvent ae) {
        
area.setText(""); //se limpia el textarea
    
}
});

aceptar.addActionListener(new ActionListener() {
    public 
void actionPerformed(ActionEvent ae) {
        
String mensaje teaxto1.getText().trim() + " : " texto2.getText().trim();
        
area.setText(area.getText() + "\n" mensaje); //se colocan los textos en el TextArea
    
}
}); 
Saludos
__________________
se despide hasta la proxima
Gonzalo Castillo