Error checking code doesn't follow-through, assistance needed to make more "robust"

A table (Table "G") in a form I (said newbie) 'inherited' has the below script that is supposed to programmatically check fields prior to submission so the user can be directed to take corrective action(s). The table is optional unless either an amount is entered, or a radio button is selected.
function oneLineTable(ERROR_MESSAGES, tableLetter, tableName){
   i=0;  // set the counter
   var TEXT;
   while (xfa.resolveNode(tableName + ".ROW" + "[" + i + "]")!=null){
      TABLE_ROW = tableName + ".ROW" + "[" + i + "]";
      J_AMOUNT = xfa.resolveNode(TABLE_ROW).J_FUNDS.rawValue;
      // The following switch handles differences in Tables C, E, F, and G
      switch (tableLetter) {
         case "C" : {
            TEXT = xfa.resolveNode(TABLE_ROW).MATCHINGGRANTNAME.rawValue;
            J_AMOUNT = xfa.resolveNode(TABLE_ROW).J_FUNDS.rawValue;
            break;
         case "E" : {
            TEXT = xfa.resolveNode(TABLE_ROW).GRANTNAME.rawValue;
            J_AMOUNT = xfa.resolveNode(TABLE_ROW).J_FUNDS.rawValue;
            break;
         case "F" : {
            TEXT = xfa.resolveNode(TABLE_ROW).RECIPIENT.rawValue;
            J_AMOUNT = xfa.resolveNode(TABLE_ROW).J_FUNDS.rawValue;
            break;
         case "G" : { 
            TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OFFICER.rawValue;
            TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.REPLACEMENT_OFFICER.rawValue;
            TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.MATCH_SAL.rawValue;
            TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OVERTIME.rawValue;
            J_AMOUNT =  xfa.resolveNode(TABLE_ROW).J_FUNDS.rawValue;
            break;
      if (TEXT == null && J_AMOUNT != null) {
         ERROR_MESSAGES+="  ●  Enter Type/Amount on Table " + tableLetter + ", row "+ (i+1) + ".\u000d\u000a";
      if ((J_AMOUNT == null || J_AMOUNT == 0) && TEXT != null) {
         ERROR_MESSAGES+="  ●  Enter a dollar value for Table " + tableLetter + ", row "+ (i+1) + ".\u000d\u000a";
      if ((i != 0) && (J_AMOUNT == null && TEXT == null)) { // not first row
         ERROR_MESSAGES+="  ●  Row "+ (i+1) +" on Table " + tableLetter + " is empty.\u000d\u000a";
      else {
         if ((xfa.resolveNode(tableName + ".ROW" + "[" + i+1 + "]")!=null) && // is first row and more than one row
            (J_AMOUNT == null  && TEXT == null)) { // and first row is empty
            ERROR_MESSAGES+="  ●  Row "+ (i+1) +" on Table " + tableLetter + " is empty.\u000d\u000a";
         } // end else
      i+=1;
      }  // End While
   return (ERROR_MESSAGES);
} // End of function oneLineTable
The script is only performing correctly for the first of the four possible radio button selections ('Overtime'):
Here are a few examples of the error messages the script is currently incorrectly displaying.
The 2nd bullet item should say 'Enter a dollar value for Table G, row 2.' (instead it erroneously says 'Row 2 on Table G is empty.').
The 3rd bullet item shouldn't be displaying at all (instead it erroneously says 'Enter Type/Amount on Table G, row 4.').
Please let me know how the script must be modified so that errors are correctly displayed for the remaining three possible amount entries and radio button selections. The other tables ('C', 'E', 'F') are okay and the entries are optional.
PMB
Message was edited by: PMBInc, updated screenshot
Message was edited by: PMBInc, clarified/added more detail to problem description.

Figured out that "||" (or) had to be inserted into the syntax, therefore this:
TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.REPLACEMENT.rawValue;
TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.MATCH_SAL.rawValue;
TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OVERTIME.rawValue;
TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OFFICER.rawValue;
...needed to be changed to this:
TEXT = xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.REPLACEMENT.rawValue || xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.MATCH_SAL.rawValue || xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OVERTIME.rawValue || xfa.resolveNode(TABLE_ROW).SALARYTYPE.rblSALARYTYPE.OFFICER.rawValue;
Thank you.  PMBInc

Similar Messages

  • Computer is very slow, doesn't follow through on commands, and dies quickly. Any diagnoses would be greatly appreciated!

    I've had a used MacBook Pro for the last two years. In the past 6 months it has taken a turn for the worst: slow, doesn't follow trough on commands, quits applications, dies very quickly, and safari has gone to ****. Safari feels like dial -up at this point: it loads very slowly if at all, can't handle multiple tasks, and requires constant reloading. I have moved a lot of my documents, all photos, some music, and whatever else I could put into an external hard drive and it hasn't changed anything . My desktop is clear and I never have more than 4 apps going at a time- honestly doesn't make a difference how many are open but I don't want to over work the poor thing. I have also tried checking the utility disk/drive thing, and "cleaned" my hard drive. What is the problem? Am I due for an upgrade or is my laptop on its last legs ? I have the 2nd to latest software on my computer. Any answer would be greatly Appreciated !

    If you don't already have a current backup, back up all data before doing anything else. This procedure is a diagnostic  test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem. The backup is necessary on general principle, not because of anything suggested in this comment.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help identify which such modifications you've installed, as well as some other aspects of the configuration that may be related to the problem.
    Don’t be alarmed by the seeming complexity of these instructions — they’re easy to carry out. Here's a brief summary: In each of two steps, you copy a line of text from this web page into a window in another application. You wait about a minute. Then you paste some other text, which will have been copied automatically, back into a reply on this page. The sequence is copy; paste; paste again. That's all there is to it. Details follow.
    While investigating the problem, you may have started the computer in "safe" mode. If possible, these steps should be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. If you can only boot in safe mode, you can still use this procedure, but not all of it will work. Be sure to mention that in your reply, if you haven't already done so.
    Below are instructions to enter UNIX shell commands. The commands are safe and do nothing but produce human-readable output, but they must be entered exactly as given in order to work. If you question the safety of the procedure suggested here — which you should — search this site for other discussions in which it’s been followed without any report of ill effects. I am not asking you to trust me. If you can't satisfy yourself that these instructions are safe, don't follow them.
    The commands will line-wrap or scroll in your browser, but each one is really just a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. Step 1 should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    PB=/usr/libexec/PlistBuddy; PR () { [[ "$o" ]] && printf '\n%s:\n%s\n' "$1" "$o"; }; PF () { o=$($PB -c Print "$2" | awk -F'= ' \/$3'/{print $2}'); PR "$1"; }; { o=$(( $(vm_stat | awk '/Pageo/{sub("\\.",""); print $2}')/256 )); [[ $o -gt 1024 ]] && printf "\nPageouts: %s MiB\n" $o; o=$(kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1); PR "Loaded extrinsic kernel extensions"; o=$(launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'); PR "Loaded extrinsic user agents"; o=$(launchctl getenv DYLD_INSERT_LIBRARIES); PR "Inserted libraries"; o=$(crontab -l); PR "User cron tasks"; o=$(cat /e*/lau*); PR "Global launchd configuration"; o=$(cat ~/.lau*); PR "Per-user launchd configuration"; PF "Global login items" /L*/P*/loginw* Path; PF "Per-user login items" L*/P*/*loginit* Name; PF "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=$(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); [[ $o -eq 0 ]] || printf "\nRestricted user files: %s\n" $o; cd; o=$(find -L /S*/L*/E* {,/}L*/{A*d,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB -c 'Print :CFBundleIdentifier' "$d/Info.plist"); ID=${ID:-No bundle ID}; egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|JMicron|microsoft\.MDI|print|SoftRAID" <<< $ID && printf '%s\n\t(%s)\n' "${d%/Contents}" "$ID"; done); PR "Extrinsic loadable bundles"; o=$(find /u*/{,*/}lib -type f -exec sh -c 'file -b "$1" | grep -qw shared && ! codesign -v "$1"' {} {} \; -print); PR "Unsigned shared libraries"; for d in {,/}L*/{La,Priv,Sta}* L*/Fonts; do o=$(ls -A "$d"); PR "$d"; done; } 2>&- | pbcopy; echo $'\nStep 1 done'
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take up to a few minutes to run, depending on how many files you have and the speed of the computer. Wait for the line "Step 1 done" to appear below what you entered. The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. No typing is involved in this step.
    Step 2 
    Remember that you must be logged in as an administrator for this step. Do as in Step 1 with this line:
    PR () { [[ "$o" ]] && printf '\n%s:\n%s\n' "$1" "$o"; }; { o=$(sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'); PR "Loaded extrinsic daemons"; o=$(sudo defaults read com.apple.loginwindow LoginHook); PR "Login hook"; o=$(sudo crontab -l); PR "Root cron tasks"; o=$(syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|pagin|timed? ?o' | tail -n25 | awk '/:/{$4=""; print}'); PR "Log check"; } 2>&- | pbcopy; echo $'\nStep 2 done'
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    You can then quit Terminal.
    To prevent confusion, I'll repeat: When you type your password in the Terminal window, you won't see what you're typing.
    Note: If you don’t have a login password, set one before taking Step 2. If that’s not possible, skip the step.
    Important: If any personal information, such as your name or email address, appears in the output of these commands, anonymize it before posting. Usually that won't be necessary.
    Remember, Steps 1 and 2 are all copy-and-paste — type only your password. Also remember to post the output.

  • Error during firefox sync account creation, do I need to make a new email now?

    So I tried to make a firefox sync account years ago when it was first made, but I messed something up and never got the email confirmation to finish creating the account. I said "Forget this!" and went to do something else.
    Yesterday I wanted to sync my desktop firefox with my new laptop, and tried to make a firefox sync account. I used my new primary email address, entered the account information and captcha in, and started the creation. The verification stage was taking a very long time, so I thought I had entered the captcha incorrectly, so I tried entering the captcha again.
    That caused the verification to fail, and now I have another email address in firefox sync limbo. Is there anything I can do? I'm running out of email addresses! :\

    hello, you could try if a reset email is sent to your account when you use https://account.services.mozilla.com/forgot

  • I need to use Outlook Express to apply for jobs and I either don't have it but when I try to send an e-mail on Outlook Express, it won't go through and gives me an error report.....I really need to be able to use Outlook Express to apply for jobs. Help!

    When I try to apply for job and when I try to e-mail my resume' and Outlook Express comes up to reply to on, I put in my information, etc but when I hit send, it doesn't go through and says? POP and then error report and doesn't go through.

    I can't provide a solution with or without the error message, but without an error message, you are making everyone guess at what you see. I have no idea what you see, and I think someone who might be able to help you solve your problem would need to know what that message says. Is "Outlook Express" (Windows Live Mail) your default email processor, if not what is?

  • Adobe Encore. Hardware error (Sense Code 52100).

    I tried to output a dvd and received the following error:Adobe Encore. Hardware error (Sense Code 52100). Please contact the hardware manufacturerer for more information.

    Hardware errors are usually two things... bad media (try a different brand of disc) or a bad drive
    A workaround... and to test your media and hardware
    Set your Encore DVD/BluRay output to an ISO file or to a folder on your hard drive and then use the FREE Imgburn to write files or folders or ISO to disc for DVD or BluRay (send the author a PayPal donation if you like his program)
    Read http://forums.adobe.com/thread/1322583 for notes on installing Imgburn WITHOUT any toolbar add-ons... Set Imgburn to use the slowest burn speed your drive and media will use... I set my burn speed to 1x and let Imgburn adjust to the actual minimum

  • Do I have to use an external clock with a cDAQ-9188 and NI 9401 to read a linear encoder? I'm seeing error message that implies that but the example code doesn't show it.

    We can set up a task that works on demand but when we go to continuous sampleing we see Error -200303, which claims an external sample clock source must be specified for this application.  However, some of the NI linear encoder example code doesn't show that (uses the cDAQ 80 Mhz clock) and the documentation didn't mention that. 

    It's mentioned in the 918x user manual:
    Unlike analog input, analog output, digital input, and digital output, the cDAQ chassis counters do not have the ability to divide down a timebase to produce an internal counter sample clock.  For sample clocked operations, an external signal must be provided to supply a clock source.  The source can be any of the following signals:
    AI Sample Clock
    AI Start Trigger
    AI Reference Trigger
    AO Sample Clock
    DI Sample Clock
    DI Start Trigger
    DO Sample Clock
    CTR n Internal Output
    Freq Out
    PFI
    Change Detection Event
    Analog Comparison Event
    Assuming you have at least one available counter (there are 4 on the backplane), I would suggest to configure a continuous counter output task and use its internal output as the sample clock.  Specify the internal counter using an "_" for example "cDAQ1/_ctr0".  The terminal to use for the sample clock source would be for example "/cDAQ1/Ctr0InternalOutput".
    Which example uses the 80 MHz timebase as a sample clock?  It is far too fast for a sample clock on the 9188 according to the throughput benchmarks (80 MHz * 4 byte samples = 320 MB/s).  There is also no direct route between the 80 MHz timebase and the sample clock terminal for the counters--making this route would use a second counter anyway.
    Best Regards,
    John Passiak

  • Error while posting " gl account is relevant to tax; check code"

    Dear Experts
    During invoice booking while posting into GL the warning message appears "" Gl account is relevant to tax; check code" and this is making our work a bit tough , please check why this message is coming.
    as previously it was not there.
    Regards,
    Charmaine Martin

    Dear:
                I have a solution and i hope this will resolve your issue. Please follow as given under.
    Use transaction OBA5 and enter FS as Area. You will find message no 219 there please keep the following settings against it
    Keep User name as Blank
    and for Online - Batch - (- means message will be turned off). If you do not find Message No 219 then please go to new entry and do the settings as mentioned above.\
    Regards

  • TS3694 Just took my 1st gen iPod out of it's original box, never used before.  Plugged it into my new Mac book Pro and it recognizes that the iPod is in recovery mode but when I click to restore, error 1611 comes up - but that error code doesn't say what

    I had an 8GB 1st gen iPod in it's original box in storage and just took it out to hook it up.  Charged it overnight, plugged it into new Mac Book Pro and it was recognized as being an iPod in recovery but other identifying information was all indicated as "n/a" (so, unknown OS, etc).  Error code 1604 came up so I downloaded iTunes on the Mac Book and it is currently showing version 10.  But now when I try to restore the iPod, error code 1611 comes up and the troubleshooting doesn't tell me what else to try.  The USB connector that came with the iPod was also never used before - brand new also from the box so that should be fine.  I also tried a different USB port on the Mac Book.  Any ideas?

    Error 1611
    This error typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, this error may be a hardware issue. If the errors persist on another computer, the device may need service.

  • Select query gives error in Code inspector and extended program check

    Hi,
    I have a query .
    SELECT pernr
      FROM pa9100
      INTO TABLE t_nca_tab
      WHERE endda EQ c_date AND
      z_nca_required EQ c_yes.
    This query gives me an error in Code inspector like :
    Large table pa0001: No first field of table index in WHERE  condition
    I have one more query that gives error in extended program check
    SELECT SINGLE stell ename
          INTO (g_stell, g_name)
          FROM pa0001
          WHERE pernr EQ wa_nca_tab-pernr AND
                endda EQ c_date.
    The warning says:
    *In "SELECT SINGLE ...", the WHERE condition for the key field "SEQNR" does not
    test for equality. Therefore, the single record in question may not be unique.*
    Its too urgent.
    Please reply.
    Regards,
    Binay.

    The first field is PERNR .. so if UR not giving pernr it will fetch
    all the data from the said table and between the given dates ..
    Check if this is your requirement ...
    write the select as ...
    where r_pernr is a range ...
    SELECT pernr
    FROM pa9100
    INTO TABLE t_nca_tab
    WHERE pernr in r_pernr  <----
                 endda EQ c_date AND
                 z_nca_required EQ c_yes.
    As UR using select single it's expecting to use all the key
    fields in the where condition ...
    U can ignore this warning message

  • Error message Address doesn't exist 24593 in t-code va01,va02,va03

    Hi Friends,
    After entering order in T-code va03 i get the error message Address doesn't exist 24593 .
    please guide
    thanks in advance,
    regards.
    Bhaskar

    Check your ship-to Party.
    Also read the S-note 865271

  • Error in Code Inspector-while checking syntax in TR

    Hi,
    I am getting a error in code inspector:
    Table 'Table_name' sub-object type TABL sub-object name 'table_name'
    Buffering type is initial but delivery class is "C".
    How to avoid this?
    Thanks.

    Please check the" technical setting" of the table mentioned using SE11 and make it "fully buffered"

  • When I error check my Pages-created epub, I get the error code "undeclared prefix: ibooks." How do I resolve this error?

    I'm creating an epub with Pages for upload to various sites. When I error check the epub, I get only one error message: "undeclared prefix: ibooks." The file itself works perfectly and looks fantastic when I open it directly from my computer/ipad with numerous Mac-compatible reading apps. However, I have no idea what distortions this "error" will cause when the epub is uploaded and redistributed. Has anyone else had this problem? If so, did it create problems in distribution? Or is it irrelevant? Thanks for any practical and straight forward answers and/or suggestions.

    Based on that, it does sound like the sites you were having problems with had to do with filenames, not this error.  I can imagine a site running a standard EPUB verifier, and if any errors at all are thrown rejecting the file, but practically speaking an unknown META tag (what's causing this error) should be ignored by the parser and therefore by definition be harmless.
    I was using a free Java-based checker myself, and the fact that I managed to clear up the error indicates to me (unless I'm remembering wrong or misunderstood what fixed it in my case) that it's probably not technically the EPUB checker's failure to recognize the Apple META property; more accurately, it's that the XML dictionary the file is referencing doesn't include the Apple items in it, so the EPUB checker is correctly complaining about it.
    It could also be something as simple as Pages generating a file that is marked as an EPUB v2 file but that uses EPUB v3 features (I know my book was intended to be v3, and I could have inadvertently used headers for v2).
    Regardless, if the sites accept it, there's a good chance it is okay; DRM, at least, isn't going to change anything--only if an e-reader changes its EPUB parser at some point and breaks something, which seems unlikely.
    However, the best way to find out if it's going to work right is to test it.  Kindle is far and away the most popular reader, so try it with that and see if it comes out looking how you expect.  You should be able to view it in the Kindle application, and there is also a Kindle simulatior available from Amazon that lets you see how an e-paper Kindle will render books without having to buy one.  They have very limited EPUB support as far as features go, so it's definitely worth testing even if there are no errors--a lot of things iBooks will display just fine a Kindle will choke on.  The older e-paper Nooks, in my experience, are even worse.

  • Getting error Uni code check when modifying Ztable from work area?

    Hi all,
    Getting error Uni code check when modifying Ztable from work area?
    and how to increment counter when data modified?
    FM 'popup_to_confirm'.
    IMPORTING
           answer                      = RES.
    CHECK
          RES = '1'.
            WRITE :/ 'UPDATE'.
          MODIFY ZPPT_PPDPLAN FROM GWA_FIN_PROD.
    thanks in advance..

    what error you are getting. make sure source and Target are of similar sturcture.

  • When trying to Burn a DVD I get the following error: 'The drive reported an error:Sense Key=MEDIUM ERROR Sense Code=0x73,0x03'   Please advise

    when trying to Burn a DVD I get the following error:
    'The drive reported an error:Sense Key=MEDIUM ERROR Sense Code=0x73,0x03' 
    Please advise

    this reccommendation is to OS 10.5.8 only
    Go to the hard drive find the following folders and look for the following file, com.apple.finder.Plist, delete it and restart the computer. Its found under the following folder Users-account name-library-prefrences. This helped resolve my issue for now.

  • How to put error checking on a code

    hi im creating a daily dairy prototype i have almost finished the code it works but there no error checking and i dont know how to write a code to help me validate my prototype here is the code:
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.Label;
    import java.awt.Panel;
    import java.awt.TextField;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.ParseException;
    import java.awt.List;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JTextField;
         public class DailyDairy extends Applet implements ActionListener {
              DailyDairy panel1, panel2, panel3, panel4;
              Component[][] rowData;
              private JComboBox[] jcboxShapeCombo = new JComboBox[7];     
              private String [] shapeName={"Meeting", "Lunch", "Holiday", "Sickness", "Preparing report", "Administrative work", "Emails", "Query"};
              public void init(){
                   setLayout(new BorderLayout());
                   setBounds (20, 30, 300, 180);
                   Panel headerPanel = new Panel();
                   headerPanel.setLayout(new GridLayout(1,4));
                   //JButton button1 = new JButton("SUBMIT");
                   //add(button1);
                   Label lblHeader = new Label("Start Time");
                   headerPanel.add(lblHeader);
                   lblHeader = new Label();
                   headerPanel.add(lblHeader);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader1 = new Label("End Time");
                   headerPanel.add(lblHeader1);
                   lblHeader1 = new Label();
                   headerPanel.add(lblHeader1);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader2 = new Label("Category of Task");
                   headerPanel.add(lblHeader2);
                   lblHeader2 = new Label();
                   headerPanel.add(lblHeader2);
                   add(headerPanel, BorderLayout.WEST);
                   Label lblHeader3 = new Label("Comment");
                   headerPanel.add(lblHeader3);
                   lblHeader3 = new Label();
                   headerPanel.add(lblHeader3);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader4 = new Label("Total Time(Minutes)");
                   headerPanel.add(lblHeader4);
                   lblHeader4 = new Label();
                   headerPanel.add(lblHeader4);
                   add(headerPanel, BorderLayout.NORTH);
                   Panel data = new Panel();
                   data.setLayout(new GridLayout(7, 4));
                   rowData = new Component[ 7 ][];
                   // One row
                   for(int row = 0; row < 7; row++) {
                        rowData[ row ] = new Component[ 5 ];
                             rowData[ row ][ 0 ] = new TextField(10);
                             rowData[ row ][ 1 ] = new TextField(10);
                             ((TextField)rowData[ row ][ 1 ]).addActionListener(this);
                             rowData[ row ][ 2 ]= new JComboBox (shapeName);
                             ((JComboBox)rowData[ row ][ 2 ]).addActionListener(this);
                             //((TextField)rowData[ row ][ 2 ]).addActionListener(this);
                             rowData[ row ][ 3 ] = new TextField(10) ;
                             ((TextField)rowData[ row ][ 3 ]).addActionListener(this);
                             //JComboBox jcboxShapeCombo;
                             //System.out.println(rowData[row][2]);                    
                             //jcboxShapeCombo[2] = new JComboBox (shapeName);
                             //rowData[ row ][ 3 ] = new TextField(10);
                             rowData[ row ][ 4 ] = new TextField(10);
                             ((TextField)rowData[ row ][ 4 ]).addActionListener(this);
                             java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("h:mm");
                             ((TextField) rowData[ row ][ 0 ]).setText(sdf.format(new java.util.Date()));
                             data.add(rowData[ row ][ 0 ]);
                             data.add(rowData[ row ][ 1 ]);
                             data.add(rowData[ row ][ 2 ]);
                             data.add(rowData[ row ][ 3 ]);
                             data.add(rowData[ row ][ 4 ]);
                   add(data, BorderLayout.CENTER);
              public void actionPerformed(ActionEvent event) {
                   java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("h:mm");
                   java.util.Date start = new java.util.Date();
                   try {
                        start = sdf.parse(((TextField)rowData[ 0 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end = new java.util.Date();
                   try {
                        end = sdf.parse(((TextField)rowData[ 0 ][ 1 ]).getText());
                        //System.out.println("end" +end.getTime());
                        //System.out.println("start" +start.getTime());
                        if (end.getTime() > 0) {
                             long difference = (end.getTime() - start.getTime()) / 60000L;
                             ((TextField)rowData[ 0 ][ 4 ]).setText(Long.toString(difference));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference = (end.getTime() - start.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   java.util.Date start1 = new java.util.Date();
                   try {
                        start1 = sdf.parse(((TextField)rowData[ 1 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end1 = new java.util.Date();
                   try {
                        end1 = sdf.parse(((TextField)rowData[ 1 ][ 1 ]).getText());
                        if (end1.getTime() > 0) {
                             long difference1 = (end1.getTime() - start1.getTime()) / 60000;
                             //java.util.Date difference = new java.util.Date();
                             ((TextField)rowData[ 1 ][ 4 ]).setText(Long.toString(difference1));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date start2 = new java.util.Date();
                   try {
                        start2 = sdf.parse(((TextField)rowData[ 2 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end2 = new java.util.Date();
                   try {
                        end2 = sdf.parse(((TextField)rowData[ 2 ][ 1 ]).getText());
                        if (end2.getTime() > 0) {
                             long difference2 = (end2.getTime() - start2.getTime()) / 60000;
                             //java.util.Date difference = new java.util.Date();
                             ((TextField)rowData[ 2 ][ 4 ]).setText(Long.toString(difference2));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference2 = (end2.getTime() - start2.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   //((TextField)rowData[ 2 ][ 4 ]).setText(Long.toString(difference2));
                   java.util.Date start3 = new java.util.Date();
                   try {
                        start3 = sdf.parse(((TextField)rowData[ 3 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end3 = new java.util.Date();
                   try {
                        end3 = sdf.parse(((TextField)rowData[ 3 ][ 1 ]).getText());
                        if (end3.getTime() > 0) {
                             long difference3 = (end3.getTime() - start3.getTime()) / 60000;
                             ((TextField)rowData[ 3 ][ 4 ]).setText(Long.toString(difference3));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference3 = (end3.getTime() - start3.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   java.util.Date start4 = new java.util.Date();
                   try {
                        start4 = sdf.parse(((TextField)rowData[ 4 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end4 = new java.util.Date();
                   try {
                        end4 = sdf.parse(((TextField)rowData[ 4 ][ 1 ]).getText());
                        if (end4.getTime() > 0) {
                             long difference4 = (end4.getTime() - start4.getTime()) / 60000;
                             ((TextField)rowData[ 4 ][ 4 ]).setText(Long.toString(difference4));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference4 = (end4.getTime() - start4.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   //JTextField aField= (JTextField)event.getSource();
                   //if (aField)== rowData[ 0 ][ 1 ])calc row(0, 4);
                   //if (aField)== rowData[ 1 ][ 1 ])calc row(1, 4);
    }

    edit your post to have [ c o d e ] tags around your code,
    then maybe someone will have a look.
    And try to better explain your goals and your problem. Let us know what you have tried, what did you expect and what have you got.
    What is a "prototype" and on what specs should it be validaded?

Maybe you are looking for

  • How to open a .ics file in iphone 5s?

    Is .ics file supported by iphone 5s?

  • Question re: upgrading to OS 10.6.2 and Time Machine settings

    Hello all - and Happy New Year. A friend of mine who received a Mac Air for Christmas also received an Apple Time Machine to go with it. (I have to say that he is loving the Mac!) When we (I) tried to install the Time Machine for him we ran into a lo

  • Exp File from Oracle 8i  and  Imp into Oracle 10G

    Dear Friends I have two servers one using oracle 8i and the other 10G. Firstly i have exported the file from oracle 8i using exp command. Im trying to import the file into 10G , Although this takes place successfully the character set conversion take

  • Reprint the Vendor Check

    Hi Experts, User Posted the vendor manual payment using F-58 Payment with Print out. System Voided some checks and gave the void reason code 02 - payment over flow. and system assign replacement check number. In the payment voucher system is printing

  • EXPORT ERROR MESSAGE ON QT

    I am using Premiere 6.5 for editing. On exporting anything longer than 15 minutes I get a message saying error 90-100% complete. I am using QT 7.04. I went back to QT 6.5 and I can now export any length of footage from the timeline. Mystery ! Any ide