elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


  Mostrar Temas
Páginas: [1]
1  Programación / Java / Como regresar al menu principal en: 26 Abril 2014, 21:14 pm
Hola necesito ayuda urgente, he trado de regresar al menu principal del sgt programa y no he podido alguien que me ayude por favor... el programa aun no esta completo.


import java.util.*;
import javax.swing.*;
public class Menu {
 
    public static void main (String [] args){
        int menu=0, i=0, cuentas=0, password=0,p=0,R=0; 
        String s="";
        String cedula="";
        String informacion="";
        Vector x= new Vector ();
       
     
        menu=Integer.parseInt(JOptionPane.showInputDialog("OPCIONES\n1. Registro de usuarios \n2. Actualizar Datos\n3. Consultar Saldo\n4. Retiros\n5. Consignar"));
        switch (menu){
            case 1:
               
                    x.add(JOptionPane.showInputDialog("Ingrese Cedula"));
                    x.add(JOptionPane.showInputDialog("Ingrese Nombre"));
                    x.add(JOptionPane.showInputDialog("Ingrese Apeliido"));
                    x.add(JOptionPane.showInputDialog("Ingrese Sexo"));
                    cuentas=Integer.parseInt(JOptionPane.showInputDialog("1. Tarjeta Credito\n2. Tarjeta Debido\n3 Ambas Tarjetas"));
                    if (cuentas==1){
                        x.add(JOptionPane.showInputDialog("Ingrese Tarjeta Credito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Clave Tarjeta.Credito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Dinero Tarjeta Credito"));   
                    }
                    if (cuentas==2){
                        x.add("");
                        x.add("");
                        x.add("");
                        x.add(JOptionPane.showInputDialog("Ingrese Tarjeta Debito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Clave Tarjeta Debito"));
                        x.add(JOptionPane.showInputDialog("Ingrese  Dinero Tarjeta Credito")); 
                    }
                    if (cuentas==3){
                        x.add(JOptionPane.showInputDialog("Ingrese Tarjeta Credito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Clave Tarjeta.Credito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Dinero Tarjeta Credito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Tarjeta Debito"));
                        x.add(JOptionPane.showInputDialog("Ingrese Clave Tarjeta Debito"));
                        x.add(JOptionPane.showInputDialog("Ingrese  Dinero Tarjeta Credito"));
                    }
                    p=Integer.parseInt(JOptionPane.showInputDialog("Ingrese 0 Regresar al menu principal"));
                   
                    /*for (i=0;i<=x.size();i++){
                        JOptionPane.showMessageDialog(null, "Sus datos son: " +x.get(i));
                    } *///MUESTA LOS DATOS
           
                  break;
               
            case 2:
                cedula=JOptionPane.showInputDialog("Ingrese Cedula");
               
                for (i=0;i<=x.size();i=i+9){
                    if (cedula.equals(x.get(i).toString())){
                    for (i=0;i<=x.size();i++)
                    {
                        JOptionPane.showMessageDialog(null, "Sus datos son:" +x.get(i));
                    }   
                    }
                }
            break;
        } 
    }   
    }

Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines