errrors that keep occurring

Page 1 of 1

1 Replies - 630 Views - Last Post: 21 July 2012 - 01:16 PM Rate Topic: -----

#1 wildpeach75  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 21-July 12

errrors that keep occurring

Posted 21 July 2012 - 10:08 AM

  /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //class Charity  {
        // object to be written to screen; Name,CharityName,Amount = new Name, 
        System.out.printf("Name", "CharityName", "Amount");
        class Object {
            // Put the table in a scroll pane.              

            
            public void JTable (Name[][]),
                    (Charity Name[]),
                    (Amount),
                    (Object CharityName));

            public FundraiserProgram()
            {
            
         String[] colNames = {"Name", "Charity", "Amount"};
// declare contents of enum
        String[][] rowData = {{"Jean", "CharityName", "75"},
            {"Tim", "CharityName", "50"},
            {"Matt", "CharityName", "100"},
            {"Rose", "CharityName", "10"},
            {"Geri", "CharityName", "15"},
            {"Shawn", "CharityName", "20"},
            {"Renee", "CharityName", "5"},
            {"Joe", "CharityName", "7"}};

// declare contents of enum
        JTable myTable = new JTable(rowData, colNames);
        Component JTable = null;
        JScrollPane scrollPane = new JScrollPane(JTable);
     // end JTable enum }   
   }
}


Error Messages:

init:
deps-clean:
Updating property file: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\built-clean.properties
Deleting directory C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build
clean:
init:
deps-jar:
Created dir: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build
Updating property file: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\built-jar.properties
Created dir: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\classes
Created dir: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\empty
Created dir: C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\generated-sources\ap-source-output
Compiling 6 source files to C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\build\classes
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\src\fundraiserprogram\FundraiserProgram.java:31: error: invalid method declaration; return type required
            public JTable (Name[][]),
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\src\fundraiserprogram\FundraiserProgram.java:31: error: <identifier> expected
            public JTable (Name[][]),
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\src\fundraiserprogram\FundraiserProgram.java:31: error: ';' expected
            public JTable (Name[][]),
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\src\fundraiserprogram\FundraiserProgram.java:36: error: invalid method declaration; return type required
            public FundraiserProgram()
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\src\fundraiserprogram\FundraiserProgram.java:56: error: reached end of file while parsing
}
5 errors
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\nbproject\build-impl.xml:605: The following error occurred while executing this line:
C:\Users\Peachy\Documents\NetBeansProjects\FundraiserProgram\nbproject\build-impl.xml:246: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)


This post has been edited by baavgai: 21 July 2012 - 12:29 PM
Reason for edit:: tagged


Is This A Good Question/Topic? 0
  • +

Replies To: errrors that keep occurring

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10185
  • View blog
  • Posts: 37,603
  • Joined: 27-December 08

Re: errrors that keep occurring

Posted 21 July 2012 - 01:16 PM

Please avoid duplicate posting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1