import java.applet.Applet;
import java.awt.TextField;
import java.awt.Label;
import java.awt.Choice;
import java.awt.Panel;
import java.awt.Button;
import java.awt.TextArea;
import java.awt.BorderLayout;
public class PanelesApplet extends Applet {
  private TextField tfNombre;
  private Choice chSexo, chCiudadOrigen,chCiudadDestino;
  private TextArea taTicket;
  public void init() {
//Forma de captura de datos de persona
    Label lNombre =new Label("Nombre");
    tfNombre = new TextField(10);
    chSexo = new Choice();
    chSexo.add("Femenino");chSexo.add("Masculino");
    Panel pFormaPersona = new Panel();
    pFormaPersona.add(lNombre); pFormaPersona.add(tfNombre);pFormaPersona.add(chSexo);
//forma de captura de datos del viaje, ciudades origen y destino
    Label lCiudadOrigen = new Label("Ciudad Origen");
    chCiudadOrigen= new Choice();
    chCiudadOrigen.add("D.F."); chCiudadOrigen.add("Pachuca");chCiudadOrigen.add("Monterrey");
    Label lCiudadDestino = new Label("Ciudad Destino");
    chCiudadDestino= new Choice();chCiudadDestino.add("Cancun"); 
    chCiudadDestino.add("Acapulco");chCiudadDestino.add("Zacatecas");
    Panel pFormaViaje  = new Panel();
    pFormaViaje.add(lCiudadOrigen); pFormaViaje.add(chCiudadOrigen);
    pFormaViaje.add(lCiudadDestino);pFormaViaje.add(chCiudadDestino);
//boton y area de texto
    Button bReservar = new Button("Reservar");
    taTicket = new TextArea(10,10);
    Panel pSalida= new Panel();
    pSalida.add(bReservar); pSalida.add(taTicket);
//agregar al applet
    setLayout(new BorderLayout());
    add("North",pFormaPersona); add("Center",pFormaViaje); add("South",pSalida);
  }

}












