|    
			
				06/09/2002, 19:01
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: junio-2002 
						Mensajes: 122
					 Antigüedad: 23 años, 4 meses Puntos: 3 |  | 
  |  Re: Frame desde otro frame (URGENTE)  
  Codigo:  Cita:  import java.awt.*;import java.applet.*;
 import java.awt.event.*;
 
 public class Banco extends Frame implements ActionListener{
 
 //COMPONENTES
 private Label b;
 private Button tabla1, tabla2, graficos, salir;
 private Panel p1;
 private Panel p2;
 private Panel p3;
 
 //VALORES NECESARIOS PARA LAS TABLAS
 public int n;
 public int k;
 public int tiempo;
 
 public int[] cliC;//clientes cajas
 public int[] tToC;//tpo total de atencion
 public int[] cli;//clientes por prioridad
 public int[] tto;//tpo total de espera
 
 static public void main(String[]args){
 Banco a=new Banco(); a.pack(); a.show();
 int n = Integer.parseInt(args[0]);
 int k = Integer.parseInt(args[1]);
 int tiempo = Integer.parseInt(args[2]);
 }
 
 public Banco(){
 Simulacion A=new Simulacion(n,k,tiempo);
 A.Simular();
 
 cliC=new int[n];
 tToC=new int[n];
 cli=new int[4];
 tto=new int[4];
 
 for(int i=0; i<n;++i){
 cliC[I]=A.clienteC[i];
 tToC[i]=A.tpoTotal;
 }
 
 for(int j=0; j<n;++j){
 cli[j]=A.clientes[j];
 tto[j]=A.tpoTotal[j];
 }
 
 
 b=new Label("Bienvenido a BeaucheffBank");
 tabla1=new Button("Tabla Cajas");
 tabla2=new Button("Tabla Clientes");
 graficos=new Button("Graficos");
 salir=new Button("Salir");
 
 p1=new Panel();
 p1.setLayout(new GridLayout(1,1));
 p1.add(b);
 
 p2=new Panel();
 p2.setLayout(new GridLayout(1,2));
 p2.add(tabla1);p2.add(tabla2);
 
 p3=new Panel();
 p3.setLayout(new GridLayout(1,2));
 p3.add(graficos);p2.add(salir);
 
 setLayout(new GridLayout(3,1));
 add(p1);add(p2);add(p3);
 
 tabla1.addActionListener(this);
 salir.addActionListener(this);
 }
 
 public void actionPerformed(ActionEvent x)
 {
 if(x.getSource()==salir)System.exit(0);
 if(x.getSource()==tabla1){Tabla b=new Tabla(cliC,tToC,n); b.pack(); b.show();}
 }
 
 
 }
 
 
 Gracias a todos los que puedan ayudarme...
 
...El boucheffiano...         |