Newbie Help With File Parser

I have an assignment that involves using Java to parse the info on one text file and output to another text file with a header row and a data row both of which need to be tab delimited. I'm relatively new to Java and I'm having a hard time even starting this thing. Any help would be greatly appreciated. The file I have to read from is similar to this:
Report: Fake Report for Fake Loans
Report ID: 000001
Run Date: 04/25/2007
Office Number ID Number DelqMessage
033 000101000 N
034 001234875 Y
035 123456789 N
I would essentially need to get all the field names into the header row and the data in the row below it.
Thanks in advance.

I have been working on this and I almost have it working correctly. I was able to selectively pull the info I need from the original file and I can output to the new file in a vertical form. The last step is to output a header that says RunDate Office Loan DelqMessage with a tab delimiter. I than have to compile the data and output in rows under the header also in tab delimited format. I think I'm right there but I still get one error I cannot resolve of:
Error: java.lang.StringIndexOutOfBoundsException: String index out of range: 4
It is very vague and I have tried everything I can think of to locate the issue so it can be debugged. Below is a copy of the file I'm trying to parse followed by what I have for code so far. Any help would be greatly appreciated.
Sample of report:
Report: Fake Report for Fake Loans
Report ID: 000001
Run Date: 04/25/2007
ASC Number Loan ID DelqMessage
033 000101000 N
034 001234875 Y
035 123456789 N
ASC Number Loan ID DelqMessage
036 741258963 N
037 872563987 N
038 987521455 Y
======================================================================
Fake Report Summary:
ASC Total: 6
Loan Total: 6
Total Delq: 2
Code:
import java.io.FileReader;
import java.io.FileWriter;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;
public class ParseFile {
public static void main(String[] args) throws IOException {
     // Variable Declaration
     boolean procOn;
     String RunDate = "";
     BufferedReader inputStream = null;
PrintWriter outputStream = null;
     // Following block of code parses FakeReportToParse.txt and outputs
     // needed portions of the report to characteroutput.txt
try {
     procOn=false;
     inputStream =
new BufferedReader(new FileReader("FakeReportToParse.txt"));
outputStream =
new PrintWriter(new FileWriter("characteroutput.txt"));
String l;
while ((l = inputStream.readLine()) != null) {
     outputStream.println("Rundate\tASCNumber\tLoan\tDelqMessage");
     if (l.indexOf("Run Date:")>=0) {
          RunDate = l.substring(10);
          outputStream.println(RunDate);
     // Processing of report data
     if(l.indexOf("ASC Number Loan ID") >= 0) {
          procOn = true;
     if(l.indexOf("-------------------------") >= 0 || l.indexOf("===============================") >= 0) {
          procOn = false;
     // Output report data to new characteroutput.txt file
     if(procOn) {
          String ASC = l.substring(0, 4).trim();
          String LoanID = l.substring(15, 25).trim();
          String DelqM = l.substring(30).trim();
     outputStream.println(RunDate + "\t" + ASC + "\t" + LoanID + "\t" + DelqM);
     catch(Exception z){
System.out.println("Error: " + z.toString());
}

Similar Messages

  • Help With String parsing

    Hey guys,
    I need some help with String Parsing. i hope experts here will help me.
    i'm reading a text file and getting data as String in this format
    *ABR, PAT MSSA        2009       7001    B   ABC       Y
    *VBR, SAT ZSSA        2008       5001    A   CED       N
    *ABC, AAT CSSA        5008       001     A   AZX       N
    *CBC, CAT FSSA        308        5001    A   XCV       N
    Now from following lines i have to extract Number data i.e. 2009 and 7001 from 1st line. 2008 and 5001 from 2nd line and so on.
    Can anyone pls suggest me any way to get the data that i want from these Strings
    Thanks for your time to read this.
    Regards,
    sam

    Thanks for the reply
    Data length can vary. ABR, PAT is the last name, First Name of the Users.
    it can be following or any other combination. i just need 2 set of numbers from the complete line rest i can ignore. Any other way to get that
    *ABRaaassd, PATfffff MSSA 2009 7001 B ABC Y
    *VBRaa, SATaa ZSSA 2008 5001 A CED N
    *ABC, AAT CSSA 5008 001 A AZX N
    *CBC, CAT FSSA 308 5001 A XCV N                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need Help With File Matching Records

    I need help with my file matching program.
    Here is how it suppose to work: FileMatch class should contain methods to read oldmast.txt and trans.txt. When a match occurs (i.e., records with the same account number appear in both the master file and the transaction file), add the dollar amount in the transaction record to the current balance in the master record, and write the "newmast.txt" record. (Assume that purchases are indicated by positive amounts in the transaction file and payments by negative amounts.)
    When there is a master record for a particular account, but no corresponding transaction record, merely write the master record to "newmast.txt". When there is a transaction record, but no corresponding master record, print to a log file the message "Unmatched transaction record for account number ..." (fill in the account number from the transaction record). The log file should be a text file named "log.txt".
    Here is my following program code:
    // Exercise 14.8: CreateTextFile.java
    // creates a text file
    import java.io.FileNotFoundException;
    import java.lang.SecurityException;
    import java.util.Formatter;
    import java.util.FormatterClosedException;
    import java.util.NoSuchElementException;
    import java.util.Scanner;
    import org.egan.AccountRecord;
    import org.egan.TransactionRecord;
    public class CreateTextFile
      private Formatter output1;  // object used to output text to file
      private Formatter output2;  // object used to output text to file
      // enable user to open file
      public void openTransFile()
        try
          output1 = new Formatter("trans.txt");
        catch (SecurityException securityException)
          System.err.println("You do not have write access to this file.");
          System.exit(1);
        } // end catch
        catch (FileNotFoundException filesNotFoundException)
          System.err.println("Error creating file.");
          System.exit(1);
      } // end method openTransFile
      // enable user to open file
      public void openOldMastFile()
        try
          output2 = new Formatter("oldmast.txt");
        catch (SecurityException securityException)
          System.err.println("You do not have write access to this file.");
          System.exit(1);
        } // end catch
        catch (FileNotFoundException filesNotFoundException)
          System.err.println("Error creating file.");
          System.exit(1);
      } // end method openOldMastFile
      // add transaction records to file
      public void addTransactionRecords()
        // object to be written to file
        TransactionRecord record1 = new TransactionRecord();
        Scanner input1 = new Scanner(System.in);
        System.out.printf("%s\n%s\n%s\n%s\n\n",
          "To terminate input, type the end-of-file indicator",   
          "when you are prompted to enter input.",
          "On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
          "On Windows type <ctrl> z then press Enter");
        System.out.printf("%s\n%s",
           "Enter account number (> 0) and amount.","? ");
        while (input1.hasNext())  // loop until end-of-file indicator
          try // output values to file
            // retrieve data to be output
            record1.setAccount(input1.nextInt());    // read account number
            record1.setAmount(input1.nextDouble());  // read amount
            if (record1.getAccount() > 0)
              // write new record
              output1.format("%d %.2f\n", record1.getAccount(), record1.getAmount());
            } // end if
            else
              System.out.println("Account number must be greater than 0.");
            } // end else
          } // end try
          catch (FormatterClosedException formatterClosedException)
            System.err.println("Error writing to file.");
            return;
          } // end catch
          catch (NoSuchElementException elementException)
            System.err.println("Invalid input. Please try again.");
            input1.nextLine(); // discard input so user can try again
          } // end catch
          System.out.printf("%s %s\n%s", "Enter account number (> 0) ",
            "and amount.","? ");
        } // end while
      } // end method addTransactionRecords
      // add account records to file
      public void addAccountRecords()
        // object to be written to file
        AccountRecord record2 = new AccountRecord();
        Scanner input2 = new Scanner(System.in);
        System.out.printf("%s\n%s\n%s\n%s\n\n",
          "To terminate input, type the end-of-file indicator",   
          "when you are prompted to enter input.",
          "On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
          "On Windows type <ctrl> z then press Enter");
        System.out.printf("%s\n%s",
           "Enter account number (> 0), first name, last name and balance.","? ");
        while (input2.hasNext())  // loop until end-of-file indicator
          try // output values to file
            // retrieve data to be output
            record2.setAccount(input2.nextInt());    // read account number
            record2.setFirstName(input2.next());      // read first name
            record2.setLastName(input2.next());       // read last name
            record2.setBalance(input2.nextDouble());  // read balance
            if (record2.getAccount() > 0)
              // write new record
              output2.format("%d %s %s %.2f\n", record2.getAccount(), record2.getFirstName(),
                record2.getLastName(), record2.getBalance());
            } // end if
            else
              System.out.println("Account number must be greater than 0.");
            } // end else
          } // end try
          catch (FormatterClosedException formatterClosedException)
            System.err.println("Error writing to file.");
            return;
          } // end catch
          catch (NoSuchElementException elementException)
            System.err.println("Invalid input. Please try again.");
            input2.nextLine(); // discard input so user can try again
          } // end catch
          System.out.printf("%s %s\n%s", "Enter account number (> 0),",
            "first name, last name and balance.","? ");
        } // end while
      } // end method addAccountRecords
      // close file
      public void closeTransFile()
        if (output1 != null)
          output1.close();
      } // end method closeTransFile
      // close file
      public void closeOldMastFile()
        if (output2 != null)
          output2.close();
      } // end method closeOldMastFile
    } // end class CreateTextFile--------------------------------------------------------------------------------------------------
    // Exercise 14.8: CreateTextFileTest.java
    // Testing class CreateTextFile
    public class CreateTextFileTest
       // main method begins program execution
       public static void main( String args[] )
         CreateTextFile application = new CreateTextFile();
         application.openTransFile();
         application.addTransactionRecords();
         application.closeTransFile();
         application.openOldMastFile();
         application.addAccountRecords();
         application.closeOldMastFile();
       } // end main
    } // end class CreateTextFileTest-------------------------------------------------------------------------------------------------
    // Exercise 14.8: TransactionRecord.java
    // A class that represents on record of information
    package org.egan; // packaged for reuse
    public class TransactionRecord
      private int account;
      private double amount;
      // no-argument constructor calls other constructor with default values
      public TransactionRecord()
        this(0,0.0); // call two-argument constructor
      } // end no-argument AccountRecord constructor
      // initialize a record
      public TransactionRecord(int acct, double amt)
        setAccount(acct);
        setAmount(amt);
      } // end two-argument TransactionRecord constructor
      // set account number
      public void setAccount(int acct)
        account = acct;
      } // end method setAccount
      // get account number
      public int getAccount()
        return account;
      } // end method getAccount
      // set amount
      public void setAmount(double amt)
        amount = amt;
      } // end method setAmount
      // get amount
      public double getAmount()
        return amount;
      } // end method getAmount
    } // end class TransactionRecord -------------------------------------------------------------------------------------------------
    // Exercise 14.8: AccountRecord.java
    // A class that represents on record of information
    package org.egan; // packaged for reuse
    import org.egan.TransactionRecord;
    public class AccountRecord
      private int account;
      private String firstName;
      private String lastName;
      private double balance;
      // no-argument constructor calls other constructor with default values
      public AccountRecord()
        this(0,"","",0.0); // call four-argument constructor
      } // end no-argument AccountRecord constructor
      // initialize a record
      public AccountRecord(int acct, String first, String last, double bal)
        setAccount(acct);
        setFirstName(first);
        setLastName(last);
        setBalance(bal);
      } // end four-argument AccountRecord constructor
      // set account number
      public void setAccount(int acct)
        account = acct;
      } // end method setAccount
      // get account number
      public int getAccount()
        return account;
      } // end method getAccount
      // set first name
      public void setFirstName(String first)
        firstName = first;
      } // end method setFirstName
      // get first name
      public String getFirstName()
        return firstName;
      } // end method getFirstName
      // set last name
      public void setLastName(String last)
        lastName = last;
      } // end method setLastName
      // get last name
      public String getLastName()
        return lastName;
      } // end method getLastName
      // set balance
      public void setBalance(double bal)
        balance = bal;
      } // end method setBalance
      // get balance
      public double getBalance()
        return balance;
      } // end method getBalance
      // combine balance and amount
      public void combine(TransactionRecord record)
        balance = (getBalance() + record.getAmount()); 
      } // end method combine
    } // end class AccountRecord -------------------------------------------------------------------------------------------------
    // Exercise 14.8: FileMatch.java
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.lang.IllegalStateException;
    import java.util.NoSuchElementException;
    import java.util.Scanner;
    import java.util.Formatter;
    import java.util.FormatterClosedException;
    import org.egan.AccountRecord;
    import org.egan.TransactionRecord;
    public class FileMatch
      private Scanner inTransaction;
      private Scanner inOldMaster;
      private Formatter outNewMaster;
      private Formatter theLog;
      // enable user to open file
      public void openTransFile()
        try
          inTransaction = new Scanner(new File("trans.txt"));
        } // end try
        catch (FileNotFoundException fileNotFoundException)
          System.err.println("Error opening file.");
          System.exit(1);
        } // end catch
      } // end method openTransFile
      // enable user to open file
      public void openOldMastFile()
        try
          inOldMaster = new Scanner(new File("oldmast.txt"));
        } // end try
        catch (FileNotFoundException fileNotFoundException)
          System.err.println("Error opening file.");
          System.exit(1);
        } // end catch
      } // end method openOldMastFile
      // enable user to open file
      public void openNewMastFile()
        try
          outNewMaster = new Formatter("newmast.txt");
        catch (SecurityException securityException)
          System.err.println("You do not have write access to this file.");
          System.exit(1);
        } // end catch
        catch (FileNotFoundException filesNotFoundException)
          System.err.println("Error creating file.");
          System.exit(1);
      } // end method openNewMastFile
      // enable user to open file
      public void openLogFile()
        try
          theLog = new Formatter("log.txt");
        catch (SecurityException securityException)
          System.err.println("You do not have write access to this file.");
          System.exit(1);
        } // end catch
        catch (FileNotFoundException filesNotFoundException)
          System.err.println("Error creating file.");
          System.exit(1);
      } // end method openLogFile
      // update records
      public void updateRecords()
        TransactionRecord transaction = new TransactionRecord();
        AccountRecord account = new AccountRecord();
        try // read records from file using Scanner object
          System.out.println("Start file matching.");
          while (inTransaction.hasNext() && inOldMaster.hasNext())
            transaction.setAccount(inTransaction.nextInt());     // read account number
            transaction.setAmount(inTransaction.nextDouble());   // read amount
            account.setAccount(inOldMaster.nextInt());     // read account number
            account.setFirstName(inOldMaster.next());      // read first name 
            account.setLastName(inOldMaster.next());       // read last name
            account.setBalance(inOldMaster.nextDouble());  // read balance
            if (transaction.getAccount() == account.getAccount())
              while (inTransaction.hasNext() && transaction.getAccount() == account.getAccount())
                account.combine(transaction);
                outNewMaster.format("%d %s %s %.2f\n",
                account.getAccount(), account.getFirstName(), account.getLastName(),
                account.getBalance());
                transaction.setAccount(inTransaction.nextInt());     // read account number
                transaction.setAmount(inTransaction.nextDouble());   // read amount
            else if (transaction.getAccount() != account.getAccount())
              outNewMaster.format("%d %s %s %.2f\n",
              account.getAccount(), account.getFirstName(), account.getLastName(),
              account.getBalance());         
              theLog.format("%s%d","Unmatched transaction record for account number ",transaction.getAccount());
          } // end while
          System.out.println("Finish file matching.");
        } // end try
        catch (NoSuchElementException elementException)
          System.err.println("File improperly formed.");
          inTransaction.close();
          inOldMaster.close();
          System.exit(1);
        } // end catch
        catch (IllegalStateException stateException)
          System.err.println("Error reading from file.");
          System.exit(1);
        } // end catch   
      } // end method updateRecords
      // close file and terminate application
      public void closeTransFile()
        if (inTransaction != null)
          inTransaction.close();
      } // end method closeTransFile
      // close file and terminate application
      public void closeOldMastFile()
        if (inOldMaster != null)
          inOldMaster.close();
      } // end method closeOldMastFile
      // close file
      public void closeNewMastFile()
        if (outNewMaster != null)
          outNewMaster.close();
      } // end method closeNewMastFile
      // close file
      public void closeLogFile()
        if (theLog != null)
          theLog.close();
      } // end method closeLogFile
    } // end class FileMatch-------------------------------------------------------------------------------------------------
    // Exercise 14.8: FileMatchTest.java
    // Testing class FileMatch
    public class FileMatchTest
       // main method begins program execution
       public static void main( String args[] )
         FileMatch application = new FileMatch();
         application.openTransFile();
         application.openOldMastFile();
         application.openNewMastFile();
         application.openLogFile();
         application.updateRecords();
         application.closeLogFile();
         application.closeNewMastFile();
         application.closeOldMastFile();
         application.closeTransFile();
       } // end main
    } // end class FileMatchTest-------------------------------------------------------------------------------------------------
    Sample data for master file:
    Master file                         
    Account Number            Name                     Balance
    100                            Alan Jones                   348.17
    300                            Mary Smith                    27.19
    500                            Sam Sharp                   0.00
    700                            Suzy Green                   -14.22Sample data for transaction file:
    Transaction file                    Transaction
    Account Number                  Amount
    100                                         27.14
    300                                         62.11
    300                                         83.89
    400                                         100.56
    700                                         80.78
    700                                         1.53
    900                                         82.17  -------------------------------------------------------------------------------------------------
    My FileMatch class program above has bugs in it.
    The correct results for the newmast.txt:
    100  Alan  Jones  375.31
    300  Mary  Smith  173.19
    500  Sam  Sharp  0.00
    700  Suzy Green  68.09The correct results for the log.txt:
    Unmatched transaction record for account number 400Unmatched transaction record for account number 900------------------------------------------------------------------------------------------------
    My results for the newmast.txt:
    100 Alan Jones 375.31
    300 Mary Smith 111.08
    500 Sam Sharp 0.00
    700 Suzy Green -12.69My results for the log.txt
    Unmatched transaction record for account number 700-------------------------------------------------------------------------------------------------
    I am not sure what is wrong with my code above to make my results different from the correct results.
    Much help is appreciated. Please help.

    From the output, it looks like one problem is just formatting -- apparently you're including a newline in log entries and not using tabs for the newmast output file.
    As to why the numbers are off -- just from glancing over it, it appears that the problem is when you add multiple transaction values. Since account.combine() is so simple, I suspect that you're either adding creating transaction objects incorrectly or not creating them when you should be.
    Create test input data that isolates a single case of this (e.g., just the Mary Smith case), and then running your program in a debugger or adding debugging code to the add/combine method, so you can see what's happening in detail.
    Also I'd recommend reconsidering your design. It's a red flag if a class has a name with "Create" in it. Classes represent bundles of independant state and transformations on that state, not things to do.

  • Please help with File input!

    This is my first time dealing with file I/O and need help figuring out the best way to read in data and store it for further manipulation. I have a file that contains an individual's salary, and 3 product ratings on each line, such as: 75000 01 05 09
    What is the best way to store this data? I know how to use BufferedReader and how to tokenize each integer. I must write this program to deal with any number of lines in a file. There are three income brackets, and I must also be able to perform the following calculations:
    a) For each income bracket, the average rating for each product
    b) The number of persons in Income Bracket $50000-74000 that rates all three products with a score of 5 or higher.
    c) The average rating for Product 2 by persons who rated Product 1 lower than Prodcut 3.
    Thus far, I've written the following code to open the file and perform 2 reads to get the total number of lines (individuals) and the total number of inidividuals in each income bracket. It compiles, but I get a null pointed exception at StringTokenizer, for some reason.
    Please help! Do I need to take lines in as arrays? (tried this, but don't understand how to get at individual data) Do I need to somehow create objects for each person (if so, how?). My reference text covers this area poorly. Thanks for all help.
    import java.io.*;
    import java.util.*;
    public class Product_Survey
         public static void main(String [] args)
              int lineCount = 0;
              int inc1total = 0;
              int inc2total = 0;
              int inc3total = 0;
              String name = null;
              System.out.println("Please enter income and product info file name:  ");
              Scanner keyboard = new Scanner(System.in);
              name = keyboard.next();
              File fileObject = new File(name);
              while ((! fileObject.exists()) || ( ! fileObject.canRead()))
                   if( ! fileObject.exists())
                        System.out.println("No such file");
                   else
                        System.out.println("That file is not readable.");
                        System.out.println("Enter file name again:");
                        name = keyboard.next();
                        fileObject = new File(name);                    
              try
                   BufferedReader inputStream = new BufferedReader(new FileReader(name));
                   String trash = "No trash yet";
                   while (trash != null)
                        trash = inputStream.readLine();
                        lineCount++;
                   inputStream.close();
              catch(IOException e)
                   System.out.println("Problem reading from file.");
              try
                   BufferedReader inputStream = new BufferedReader(new FileReader(name));
                   String trash = "No trash yet";
                   while (trash != null)
                        trash = inputStream.readLine();
                        StringTokenizer st = new StringTokenizer(trash);
                        int income = Integer.parseInt(st.nextToken());
                        if(income<50000)
                             inc1total++;
                        else if(income<75000)
                             inc2total++;
                        else if(income<100000)
                             inc3total++;
                   inputStream.close();
              catch(IOException e)
                   System.out.println("Problem reading from file.");
    }

    Try adding a print statement to see what is happening in your second read loop:
                while (trash != null)
                    trash = inputStream.readLine();
                    System.out.println("trash = " + trash);
                    StringTokenizer st = new StringTokenizer(trash);Another way to read in a while loop:
                while ((trash = inputStream.readLine()) != null)

  • Please Help with text parsing problem

    Hello,
    I have the following text in a file (cut and pasted from VI)
    12 15 03 12 15 03 81 5 80053 1 1,2,3 $23.00 1 ^M
    12 15 03 12 15 03 81 5 84550 1 1,2,3 $15.00 1 ^M
    12 15 03 12 15 03 81 5 84100 1 1,2,3 $15.00 1 ^M
    12 15 03 12 15 03 81 5 83615 1 1,2,3 $15.00 1 ^M
    12 15 03 12 15 03 81 5 82977 1 1,2,3 $15.00 1 ^M
    12 15 03 12 15 03 81 5 80061 1 1,2,3 $44.00 1 ^M
    12 15 03 12 15 03 81 5 83721 1 1,2,3 $15.00 1 ^M
    12 15 03 12 15 03 81 5 84439 1 1,2,3 $44.00 1 ^M
    12 15 03 12 15 03 81 5 84443 1 1,2,3 $40.00 1 ^M
    12 15 03 12 15 03 81 5 85025 1 1,2,3 $26.00 1 ^M
    12 15 03 12 15 03 81 5 85008 1 1,2,3 $5.00 1 ^M
    this method reads the text from a file and stores it in a ArrayList
        public ArrayList readInData(){
            File claimFile = new File(fullClaimPath);
            ArrayList returnDataAL = new ArrayList();
            if(!claimFile.exists()){
                System.out.println("Error: claim data - File Not Found");
                System.exit(1);
            try{
                BufferedReader br = new BufferedReader(new FileReader(claimFile));
                String s;
                while ((s = br.readLine()) != null){
                         System.out.println(s + " HHHH");
                        returnDataAL.add(s);
            }catch(Exception e){ System.out.println(e);}
            return returnDataAL;
        }//close loadFile()if i print the lines from above ... from the arraylist ... here is waht i get ...
    2 15 03 12 15 03 81 5 80053 1 1,2,3 $23.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 84550 1 1,2,3 $15.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 84100 1 1,2,3 $15.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 83615 1 1,2,3 $15.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 82977 1 1,2,3 $15.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 80061 1 1,2,3 $44.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 83721 1 1,2,3 $15.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 84439 1 1,2,3 $44.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 84443 1 1,2,3 $40.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 85025 1 1,2,3 $26.00 1 HHHH
    HHHH
    12 15 03 12 15 03 81 5 85008 1 1,2,3 $5.00 1 HHHH
    HHHH
    I see the ^M on the end of the lines ... but i dont understand why im getting the blank lines
    in between each entry ... I printed "HHHH" just to help with debugging ... anyone have any ideas why i am getting the extra blank lines?
    thanks,
    jd

    maybe its a FileReader deal.. Im not sure, maybe try using InputStreams. This code works for me (it reads from data.txt), give it a try and see if it works:
    import java.io.*;
    public class Example {
         public Example() throws IOException {
              BufferedReader b = new BufferedReader(new InputStreamReader(new FileInputStream("data.txt")));
              String s = "";
              while ((s = b.readLine()) != null) {
                   System.out.println(s);
              b.close();
         public static void main(String[] args) {
              try {
                   new Example();
              catch (IOException e) {
                   e.printStackTrace();
    }

  • PLEASE help with JavaScript parsing of WSDL return

    Can someone help with parsing return WSDL data?
    My return WSDL data is a concatenated string of alias names (firstname middlename lastname generation) delininated with an "@":
    7433|ALIAS|John|W|Smith| @7432|ALIAS|Johnny| |Smith| @7430|ALIAS|JJ| |Smithers| @7431|ALIAS|JJ| |Smith| @7400|ALIAS|Jon| |Smith| @7416|ALIAS|John|Wilber|Smith|JR
    I must have these names appear on my forms in a "lastname, firstname middlename generation" format. Can anyone provide expertise in this area if I provide the table.column reference?
    alias.alternate_id = tmp[0];
    alias.type = tmp[1];
    alias.firstname = tmp[2];
    alias.middlename = tmp[3];
    alias.lastname = tmp[4];
    alias.generation = tmp[5];

    Can someone help with parsing return WSDL data?
    My return WSDL data is a concatenated string of alias names (firstname middlename lastname generation) delininated with an "@":
    7433|ALIAS|John|W|Smith| @7432|ALIAS|Johnny| |Smith| @7430|ALIAS|JJ| |Smithers| @7431|ALIAS|JJ| |Smith| @7400|ALIAS|Jon| |Smith| @7416|ALIAS|John|Wilber|Smith|JR
    I must have these names appear on my forms in a "lastname, firstname middlename generation" format. Can anyone provide expertise in this area if I provide the table.column reference?
    alias.alternate_id = tmp[0];
    alias.type = tmp[1];
    alias.firstname = tmp[2];
    alias.middlename = tmp[3];
    alias.lastname = tmp[4];
    alias.generation = tmp[5];

  • Newbie - Help With templates

    I am fairly new to dreamweaver. Looking to put together a
    basic site for a holiday home for rent. Would like to include
    photos of the house and surrounding area, travel details, details
    of things to do and see, calendar, temeperature charts etc. Can
    anyone suggest where I can get my hands on templates that would
    help with this?
    Many thanks

    The best I've seen are from ProjectSeven -
    http://www.projectseven.com/
    They are commercial (look at the Page Packs) and they are
    excellent.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Gusley5" <[email protected]> wrote in
    message
    news:[email protected]...
    >I guess sources for templates is what I'm looking for.
    I've little
    >knowledge
    > of writing code so was looking for a draft template
    which would have a
    > professional look to it with regard to font, layout,
    colours, buttons to
    > use
    > for links etc. I suppose some sort of table layout for
    including photos
    > with
    > related text may be best place to start.
    >
    > Code below is from a starter page available from
    dreamweaver. Any other
    > suggestions for templates gratefully received.
    >
    > Thanks
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <!-- DW6 -->
    > <head>
    > <!-- Copyright 2005 Macromedia, Inc. All rights
    reserved. -->
    > <title>Lodging - Catalog</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <link rel="stylesheet"
    >
    href="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltI
    > n/StarterPages/mm_lodging1.css" type="text/css" />
    > </head>
    > <body bgcolor="#999966">
    > <table width="100%" border="0" cellspacing="0"
    cellpadding="0">
    > <tr>
    > <td width="15"
    nowrap="nowrap"> </td>
    > <td height="60" colspan="2" class="logo"
    nowrap="nowrap"><br />
    > WEBSITE NAME HERE</td>
    > <td width="100%"> </td>
    > </tr>
    >
    > <tr bgcolor="#ffffff">
    > <td colspan="4"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_spacer.gif" alt="" width="1" height="1"
    border="0"
    > /></td>
    > </tr>
    >
    > <tr bgcolor="#a4c2c2">
    > <td width="15"
    nowrap="nowrap"> </td>
    > <td height="36" id="navigation"
    class="navText"><a
    > href="javascript:;">HOME</a></td>
    > <td> </td>
    > <td width="100%"> </td>
    > </tr>
    >
    > <tr bgcolor="#ffffff">
    > <td colspan="4"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_spacer.gif" alt="" width="1" height="1"
    border="0"
    > /></td>
    > </tr>
    >
    > <tr bgcolor="#ffffff">
    > <td valign="top" width="15"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_spacer.gif" alt="" width="15"
    height="1" border="0"
    > /></td>
    > <td valign="top" width="35"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_spacer.gif" alt="" width="35"
    height="1" border="0"
    > /></td>
    > <td width="710" valign="top"><br />
    > <table border="0" cellspacing="0" cellpadding="2"
    width="610">
    > <tr>
    > <td colspan="7" class="pageName">Page Name
    Here</td>
    > </tr>
    > <tr>
    > <td width="22%" height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td width="22%" height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td width="22%" height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td width="22%" height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > </tr>
    > <tr>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > </tr>
    > <tr>
    > <td colspan="7"> </td>
    > </tr>
    > <tr>
    > <td height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > <td> </td>
    > <td height="110"><img
    >
    src="file:///C|/Program%20Files/Macromedia/Dreamweaver%208/Configuration/BuiltIn
    > /StarterPages/mm_product_sm.gif" alt="small product
    photo" width="110"
    > height="110" border="0" /></td>
    > </tr>
    > <tr>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > <td> </td>
    > <td valign="top" class="calendarText"
    nowrap="nowrap"><a
    > href="javascript:;">Product Name</a><br
    />
    > Price: $0.00</td>
    > </tr>
    > <tr>
    > <td colspan="7"> </td>
    > </tr>
    > </table> </td>
    > <td> </td>
    > </tr>
    >
    > <tr>
    > <td width="15"> </td>
    > <td width="35"> </td>
    > <td width="710"> </td>
    > <td width="100%"> </td>
    > </tr>
    > </table>
    > </body>
    > </html>
    >

  • Newbie - Help with Fireworks CS5 nav bar

    I am new to Fireworks. I am using Fireworks CS5. I need help with creating navigation bars and menu. Any tutorial or tips is greatly appreciated.
    Thank you.

    You'll find a tutorial named "Create a basic navigation bar" in the Fireworks help files.

  • Newbie - help with homework.

    Create a procedure to insert a record into the Bill_Items table. All the fields in the Bill_Items table will be specified as para with the exception of the Selling_Price, which will be the Current_Price, retrieved from the Menu_Items table. Do not allow the insert to finish unless there are enough of all ingredients on hand. If the insert is successfull, the quantity field in the Ingredient table will need to be updated accordingly.
    Tables are below.
    Thanks,
    CREATE TABLE Bill_Items
    Bill_Number NUMBER(6,0)
    CONSTRAINT FK_Bill_Items_Bill_Number REFERENCES Bills(Bill_Number)
    CONSTRAINT NN_Bill_Items_Bill_Number NOT NULL,
    Menu_Item_Number NUMBER(5,0)
    CONSTRAINT FK_Menu_Item_Num REFERENCES Menu_Items(Menu_Item_Number)
    CONSTRAINT NN_Bill_Items_Menu_Item_Num NOT NULL,
    Discount NUMBER(5,2)
    CONSTRAINT N_Bill_Items_Discount NULL,
    Quantity NUMBER(3,0) DEFAULT 1
    CONSTRAINT Bills_Items_Quanity_CC CHECK(Quantity > 0)
    CONSTRAINT NN_Bill_Items_Quantity NOT NULL,
    Selling_Price NUMBER(6,2) DEFAULT 0
    CONSTRAINT Bills_Items_SellingPrice_CC CHECK(Selling_Price >= 0)
    CONSTRAINT NN_Bill_Items_Selling_Price NOT NULL,
    CONSTRAINT PK_Bill_Items PRIMARY KEY(Bill_Number,Menu_Item_Number)
    CREATE TABLE Menu_Item_Ingredients
    Menu_Item_Number NUMBER(5,0)
    CONSTRAINT FK_Menu_Item_Ing_Menu_Item_Num REFERENCES Menu_Items(Menu_Item_Number)
    CONSTRAINT NN_Menu_Item_Ing_Meun_Item_Num NOT NULL,
    Ingredient_Number NUMBER(5,0)
    CONSTRAINT FK_Menu_Item_Ing_IngredientNo REFERENCES Ingredients(Ingredient_Number)
    CONSTRAINT NN_Menu_Item_Ing_IngredientNo NOT NULL,
    Quantity NUMBER(5,2) DEFAULT 1
    CONSTRAINT Menu_Item_Ing_Quanity_CC CHECK(Quantity > 0)
    CONSTRAINT NN_Menu_Item_Ing_Quanity NOT NULL,
    Constraint PK_Menu_Item_Ing PRIMARY KEY(Menu_Item_Number, Ingredient_Number)
    CREATE TABLE Ingredients
    Ingredient_Number Number(5,0)
    CONSTRAINT PK_Ingredients_IngredientNo PRIMARY KEY
    CONSTRAINT NN_Ingredients_IngredientNo NOT NULL,
    Ingredient_Name VarChar2(35)
    CONSTRAINT NN_Ingredients_Ingredient_Name NOT NULL,
    Portion_Code CHAR(2)
    CONSTRAINT FK_Ingredients_PortionCode REFERENCES Portions(Portion_Code)
    CONSTRAINT NN_Ingredients_PortionCode NOT NULL
    REFERENCES Portions(Portion_Code),
    On_Hand NUMBER(6,2) DEFAULT 1
    CONSTRAINT Ingredients_OnHand_CC CHECK(On_Hand > 0)
    CONSTRAINT NN_Ingredients_On_Hand NOT NULL,
    Reorder_Point NUMBER(6,2) DEFAULT 1
    CONSTRAINT Ingredients_Reorder_Point CHECK(Reorder_Point > 0)
    CONSTRAINT NN_Ingredients_Reorder_Point NOT NULL,
    Current_Cost NUMBER(5,2) DEFAULT 0
    CONSTRAINT Ingredients_CurrentCost_CC CHECK(Current_Cost >= 0)
    CONSTRAINT NN_Ingredients_Current_Cost NOT NULL
    CREATE TABLE Menu_Items
    Menu_Item_Number NUMBER(5,0)
    CONSTRAINT PK_Menu_Items_MenuItemsNo PRIMARY KEY
    CONSTRAINT NN_Menu_Items_MenuItemsNo NOT NULL,
    Menu_Item_Name VARCHAR2(50)
    CONSTRAINT NN_Menu_Items_Menu_Item_Name NOT NULL,
    Current_Price NUMBER(6,2) DEFAULT 0
    CONSTRAINT Menu_Items_CurrentPrice CHECK(Current_Price >=0)
    CONSTRAINT NN_Menu_Items_Current_Price NOT NULL,
    Production_Cost NUMBER(6,2) DEFAULT 0
    CONSTRAINT Menu_Items_ProdCost CHECK(Production_Cost >=0)
    CONSTRAINT NN_Menu_Items_Production_Cost NOT NULL
    );

    Newbie to oracle - help with homework.. Letting others do your work is called cheating, where I live.
    C.

  • Newbie: help with join in a select query

    Hi: I need some help with creating a select statement.
    I have two tables t1 (fields: id, time, cost, t2id) and t2 (fields: id, time, cost). t2id from t1 is the primary key in t2. I want a single select statement to list all time and cost from both t1 and t2. I think I need to use join but can't seem to figure it out even after going through some tutorials.
    Thanks in advance.
    Ray

    t1 has following records
    pkid, time, cost,product
    1,123456,34,801
    2,123457,20,802
    3,345678,40,801
    t2 has the following records
    id,productid,time,cost
    1,801,4356789,12
    2,801,4356790,1
    3,802,9845679,100
    4,801,9345614,12
    I want a query that will print following from t1 (time and cost for records that have product=801)
    123456,34
    345678,40
    followed by following from t2 (time and cost for records that have productid=801)
    4356789,12
    4356790,1
    9345614,12
    Is this possible?
    Thanks
    ray

  • Help with file management

    Well I am just starting my first project using FCP and can see that it is going to be a learning curve after coming over from PPro.
    One thing that I have been unable to find is just how to keep track of which clips have been used in the timeline, and how many times. In Premiere Pro I had the option to show video and audio usage for each clip in the browser.
    Have not found how to do this yet in FCP.
    Hope someone can help with this....
    Thanks
    Kirk

    Guess that I just have to get used to how it is done in FCP. I have over 1,500 clips in about 30 folders and it would sure make it easy if I could just glance at a clip in the browser and see if it has been used.
    Thanks for the tip on the duplicate frames though. That is going to help to identify duplicate clips once they are placed in the timeline.
    Sure seems like a lot of time spent identifying if a clip is already used though. As I look through the clips in the browser I guess there is no way to tell if they have been used other than put them in the timeline or use the search function.
    Still learning here.
    Thanks
    Kirk

  • Newbie help with editing files in DW CS3

    I am new to using Dreamweaver, and I am having trouble with
    trying to edit existing files using DW CS3. When I open an existing
    file on my local site, DW converts some of the code using &.
    This is a problem because I need to edit the file just as it was
    originally written, so I can save it after editing and upload to my
    website.
    In my Preferences, I have Code Rewriting set to:
    -Rewrite Code: Fix invalidly nexted and unclosed tags
    [Unchecked]
    -Rewrite Code: Rename form items when posting [Checked]
    -Rewrite Code: Remove extra closing tags [Unchecked]
    -Never rewrite code: In files with extensions .as .asr .asc
    .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp
    .php .php3 .vb .xml .xsl .xslt .xul
    -Special characters: Encode <, >, &, and " in
    attribute values using & [Unchecked]
    -URL encoding: Do not encode special characters
    -Active Content: Insert using browser-safe scripts [Checked
    by default]
    -Active Content: Convert tags to scripts on file open
    [Unchecked]
    Today, I opened a file with an .xml extension, and DW rewrote
    the special characters > and '. Since I have in my preferences
    to Never rewrite code in .xml, I don't understand why DW is
    rewriting the code. Also, in my preferences I have unchecked the
    Special Characters, so why is DW still rewriting the code?
    Do I have some of the Code Rewriting preferences set wrong?
    Is there another place I need to tell DW not to rewrite
    existing code?
    Thanks for your help!
    Cyndi

    It imported both, but only shows you the raw file. Ever. What you see and what you edit will only be the raw file. The associated JPG file will follow the raw file around if you move it or rename it using Lightroom, but other than that, Lightroom will ignore it. You could safely delete the JPG, and Lightroom wouldn't complain--probably wouldn't even notice.
    There's a preference you can set that will cause JPGs to be imported as separate images. Then you'd be able to see both of them and edit them separately. That preference won't take effect on images that are already in the catalogue, but will affect all future imports.
    Hal

  • Newbie Help with Restoring SPA504G config file

    I know just enough to be dangerous, but not enough to be completely effective.  Any help is much appreciated.
    I have a standalone SPA504G for which I have customized the configuration.  Frequently, several times a day, the phone resets and returns to the default configuration, erasing all my efforts.  As a result, I have two intertwined problems: 
    1 -- is there a way to prevent the resets?  I am tethered to RingCentral for my VOIP service, if that is relevant.
    2 -- if I cannot prevent the resets, how do I restore my configuration?  I have reviewed this helpful post and have downloaded the spacfg.xml file.  I have also installed Solarwinds TFTP Server for use in restoring the config file.  My problem is that I am completely unfamiliar with TFTP and have been unable to locate instructions as to how to upload, download and restore the spacfg.xml file.  Step-by-step "TFTP for Dummies" instructions would be greatly appreciated.
    Thanks for your help.
    Merk

    item 1,
    is your phone provisioned?  if Ring Central is provisioning it, they may be overwriting your changes.
    you can check by going into the provisioning tab on the phone web gui.
    click admin login --> advanced --> voice  -->provisioning
    look for profile rule. if it has anything but SPA$psn.cfg  it is probably provisioned.  (especially if it says something like http://provisioning.ringcentral.com  )
    the profile rule will download a new config file from the server every "resynch periodic" time (3600 sec by default), then if it is different from the current config it will implement and reboot.
    So to prevent this, remove the profile rule or set resynch periodic to 0.
    or have ringcentral put your changes into the provisioning file. 
    Most providers have a web 'dashboard' to make changes to the phones they manage.
    2 - to reload a config using tftp
    set up your tftp, put the file in the tftp root, and set the windows firewall to allow incoming connections to the app (solarwinds, tftpd32, etc), or port 69 UDP
    then in the gui of the phone use the resync url to load the config to the phone.
    http://ip.of.phone/admin/resync?tftp:////
    Note, if your config is in the tftproot, you should not need the /  part.
    hope it helps,
    dlm...

  • Newbie, help with .AVI files!

    I am trying to put .AVI files on my imovie hd, but when they eventually load there is nothing there but blackness. I am trying to get these files on imovie hd so that i can make my own dvd. I really dont know what i might need to do. Do I convert the avis to something? If so, what program would be used?
    Thanks
    Nick

    Hi Nicholas,
    ffmpeg is a very mighty conversion tool (besides the pro $$$ tools as Compressor), but as you experienced, no that convenient; indeed you hav eto install manually all that libraries, on ffmpegs webiste that is all discrbed in detail.. I can't guide you, I'm using an older version and it was a painstaking process of trial&error... ;-))
    BUT...
    you haven't told us, what codec is INSIDE the avi... avi is, as .mov, just a media container, containing many flavors of compression codecs, from sorenson, to mp4, from pic to divx....
    you haven't told where these avis come from (... or you don't dare to tell us ), but there's a high chance, that it contains just plain mpeg1/2....
    in that case, there's some other, much more convenient tool on the market,
    have a look here for Streamclip, it accepts .avi containers too....
    it's free, for mpeg1 it works "as is"; I would give that a try, before juggling with encoders... ;-)))
    you would help us with diagnosis&therapy, when telling us where these avis come from...

  • Newbie help with JAR files

    Okay,
    I built a simple Hello World project with Swing and it worked. Now I've build my own program from scratch and get a "Cannot find the main class" error from the JRE. Below are the contents of the manafest file craeted by Sun Java Studio 8.
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
    Main-Class: localPkg.mainForm
    X-COMMENT: Main-Class will be added automatically by build
    Also here is the source code for localPkg.mainForm
    * mainForm.java
    * Created on January 17, 2006, 9:32 AM
    * @author rowen
    package localPkg;
    import java.beans.*;
    public class mainForm extends javax.swing.JFrame {
    /** Creates new form mainForm */
    public mainForm() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    ctoF1 = new MyBeans.CtoF();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    numericField1 = new magicbeans.NumericField();
    numericField2 = new magicbeans.NumericField();
    ctoF1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    ctoF1PropertyChange(evt);
    ctoF1PropertyChange1(evt);
    getContentPane().setLayout(new java.awt.GridBagLayout());
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setText("Farenheight");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipadx = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(20, 110, 0, 0);
    getContentPane().add(jLabel1, gridBagConstraints);
    jLabel2.setText("Celsius");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(11, 110, 0, 0);
    getContentPane().add(jLabel2, gridBagConstraints);
    numericField1.setText("farenheightField");
    numericField1.setName("farenheightField");
    numericField1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    numericField1PropertyChange(evt);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 4;
    gridBagConstraints.ipadx = 119;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(6, 110, 0, 160);
    getContentPane().add(numericField1, gridBagConstraints);
    numericField2.setText("celsiusField");
    numericField2.setName("celsiusField");
    numericField2.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
    public void propertyChange(java.beans.PropertyChangeEvent evt) {
    numericField2PropertyChange(evt);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.ipadx = 99;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(6, 110, 191, 0);
    getContentPane().add(numericField2, gridBagConstraints);
    pack();
    // </editor-fold>
    private void numericField2PropertyChange(java.beans.PropertyChangeEvent evt) {                                            
    ctoF1.setC(numericField2.getValue());
    private void numericField1PropertyChange(java.beans.PropertyChangeEvent evt) {                                            
    ctoF1.setF(numericField1.getValue());
    private void ctoF1PropertyChange1(java.beans.PropertyChangeEvent evt) {                                     
    numericField2.setValue(ctoF1.getC());
    private void ctoF1PropertyChange(java.beans.PropertyChangeEvent evt) {                                    
    numericField1.setValue(ctoF1.getF());
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new mainForm().setVisible(true);
    // Variables declaration - do not modify
    private MyBeans.CtoF ctoF1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private magicbeans.NumericField numericField1;
    private magicbeans.NumericField numericField2;
    // End of variables declaration
    Using Sun Java Studio Enterprise 8 (patch 1), on Windows XP (most recent patches)
    Thanks in advance,
    Roy

    R_Owen ,
    One possible way of how to do it in JSE8 is:
    1. Put all necessary lib jars to some place under src folder.
    2. Add those jars into Compile-time libraries list (Project properties -> Libraries) for correct compilation
    3. Switch to 'Files' JSE8 tab, open manifest.mf file (it's in projects root) and add your lib jars to it.
    Syntax is:
    Class-Path: relative URLs
    That's it.
    And Class-Path attribute description from JAR File Specification:
    http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Main%20Attributes:
    �Class-Path:
    The value of this attribute specifies the relative URLs of the extensions or
    libraries that this application or extension needs.
    URLs are separated by one or more spaces.
    The application or extension class loader uses the value
    of this attribute to construct its internal search path. �
    Copy/paste from:
    http://swforum.sun.com/jive/thread.jspa?forumID=122&threadID=60169

Maybe you are looking for

  • ALV list with only 1 field

    Hi guru's, I want to create an ALV list with only a char255 field. <all_table> contains data of sflight and is of type sflight(dynamically). I want to show the data as one line. CALL FUNCTION 'DDIF_FIELDINFO_GET'        EXPORTING             tabname 

  • Problem with proyects, please help!

    Hi all, I'm new to Aperture and i have some problems. I created a series of proyect yesterday, and today i don't have all of them. but the pictures still there when a go to "All pictures" in the library. Does someone have any idea of what could hapen

  • How to create & handle policies?

    Question from a customer (anonymized): It is my understanding that the reference implementation comes with 4 sample policies:  Ad-pol, dto-pol, sub-pol, and vod-pol.  Without a policy file, both the f4fpackager and the Adobe Access SDK fail to genera

  • Runtime error  MOVE_TO_LIT_NOTALLOWED_NODATA.....urgent

    Hi All, I am stuck up at one point which is giving Runtime error  MOVE_TO_LIT_NOTALLOWED_NODATA..... I am giving the details of the dump: Error analysis                                                                                |    A new value i

  • Https Soap Adapter

    Hello, I'm developing scenario Sender Soap Adapter using https. How to configure o https? Thanks.