import java.awt.*; import javax.swing.*; public class ventana { public static void main(String[] args) { frame ventana = new frame(); ventana.setVisible(true); ventana.pack(); ventana.setLayout(new BoxLayout(ventana,BoxLayout.Y_AXIS)); ventana.setLayout(new GridLayout(3,1)); ventana.setLocation(200,300); } } class frame extends Frame { Panel p1,p2,p3; TextField t1,t2,t3; Label l1,l2,l3,l4,l5; Button b1,b2,b3; public frame() { setSize(400,300); setTitle("== Ventana sin Vida V1.01 =="); p1 = new Panel();p1.setBackground(Color.black); p2 = new Panel(); p3 = new Panel(); l1= new Label("Porgrama ventana 2.0");l1.setForeground(Color.blue); l2 = new Label("Nombre"); l3 = new Label("Apellido"); l4 = new Label("Edad"); l5 = new Label("elmitnick@gmail.com"); t1 = new TextField("*Nobre",30); t2 = new TextField("*Apellido",30); t3 = new TextField("*Edad",8); b1 = new Button("Aceptar"); b1.setBackground(Color.cyan);setForeground(Color.blue); b2 = new Button("Cancelar");b2.setBackground(Color.cyan);setForeground(Color.blue); b3 = new Button("Salir"); b3.setBackground(Color.cyan);setForeground(Color.blue); p1.add(l1); p2.setLayout(new FlowLayout()); p2.setLayout(new FlowLayout(FlowLayout.LEFT)); p2.add(l2);p2.add(t1); p2.add(l3);p2.add(t2); p2.add(l4);p2.add(t3); p3.setLayout(new FlowLayout(FlowLayout.CENTER)); p3.add(b1);p3.add(b2);p3.add(b3);p3.add(l5); add("North",p1); add("West",p2); add("South",p3); } }