I am going nuts.
Certain of my values in my jtext fields are not being passed off.
I have 4 code segments like this:
The first one works(this gets both re and im); it is the second one that is giving me problems(re2 and im2) and the code format is the same for all four.Code:private void jC2ImTextFeildActionPerformed(java.awt.event.ActionEvent evt) { String msg ="try again"; String im2_input=jC2reEdTextFeild.getText(); try{ im2 = Double.parseDouble(im2_input); }catch(NumberFormatException e){JOptionPane.showMessageDialog(null,msg,"",JOptionPane.WARNING_MESSAGE);}
The variables im,im2,re,and re2 are global .
It is the method for Im2 that does not show up. The method for re2 is iffy.
They get passed ro a calculation method say
Eveerything works great for univariate operations but as soon as I try do binary everoythingCode:private calccomplex(ava.awt.event.ActionEvent evt) { Complex c= new Complex(re,im); Complex c1=new Complex(re2,im2); // do complex math }
go to hell !
What can I do to make sure all re2 and im2 are passed off and don't get 0
Help !
}
}




Reply With Quote
