import javax.swing.*;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class DATOS_POR_APPLET extends Applet implements ActionListener
{
public TextField t1,t2,t3,t4;
public Button b1;
public void init()//inicia la interfaz
{
t1=new TextField(30);
t2=new TextField(30);
t3=new TextField(30);
t4=new TextField(50);
b1=new Button("MOSTRAR LOS DATOS");
add(t1);
add(t2);
add(t3);
add(t4);
add(b1);
b1.addActionListener(this);
}
{
if(e.getSource()==b1)
{
t4.setText(t1.getText()+" "+t2.getText()+" "+t3.getText());
//ponemos todo el el renglon t4
}
}
}
0 comentarios:
Publicar un comentario