CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Feb 2017
    Location
    Montreal
    Posts
    54

    Angry Jtextfeild problems

    I am going nuts.
    Certain of my values in my jtext fields are not being passed off.

    I have 4 code segments like this:
    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 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.
    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
    Code:
      private  calccomplex(ava.awt.event.ActionEvent evt)
      {
         Complex  c= new Complex(re,im);
          Complex c1=new Complex(re2,im2);
         // do complex math
      }
    Eveerything works great for univariate operations but as soon as I try do binary everoything
    go to hell !

    What can I do to make sure all re2 and im2 are passed off and don't get 0
    Help !

    }
    }
    Last edited by Azoth; March 11th, 2017 at 06:33 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured