[nbusers] Re: Problem with cicles and classes...

  • From: Perry kumar < >
  • To:
  • Subject: [nbusers] Re: Problem with cicles and classes...
  • Date: Thu, 13 Dec 2012 21:02:00 -0500


On Dec 13, 2012 6:22 PM, "dvdza" < "> > wrote:
Hi there im new here and kinda new on programing (excuse my poor english :S)

Im having troubles coding a program,
I have 2 class, N1 class haves a function who opens datafile .bin file, then asks for how many new data the user will put, starts a cicle until the counter be as much as required by the user, inside this cicle is called the second class who get the data inputed by the user and plus 1 to the counter, when the cicle finishes the datafile is closed and voila...

well thats the plan but I have a problem... the cicle gets a infinite cicle and the 2nd class Jframe gets opened over and over again so counter cant pus 1...

the thing is... how I "delay" the circle so it waits the 2d class get its job done so the counter can be plused....

heres that part of the code:
 void cantidad()throws IOException{


     DataOutputStream datain=new DataOutputStream(new FileOutputStream(s));

     String s=JOptionPane.showInputDialog("Cuantos Asistentes añadira?");
        int repeticiones=Integer.parseInt(s);

         JOptionPane.showMessageDialog(null," "+Global.contador+""+repeticiones);
     Agregar a= new Agregar();

    tabla.setValueAt(Global.nombre, Global.contador, 0);
    tabla.setValueAt(Global.puesto, 0, Global.contador);


Thanks for the help in advace !! :D

[nbusers] Problem with cicles and classes...

dvdza 12/13/2012

[nbusers] Re: Problem with cicles and classes...

Perry kumar 12/14/2012

[nbusers] Problem with cicles and classes...

grinningtadpole 12/14/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 25 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm