Results 1 to 6 of 6
  1. #1
    Jacob1028555 is offline Member
    Join Date
    Jun 2011
    Posts
    20
    Rep Power
    0

    Unhappy Method Not Working

    I need Help!!!!!!!!!!!!!!!

  2. #2
    Jacob1028555 is offline Member
    Join Date
    Jun 2011
    Posts
    20
    Rep Power
    0

    Default

    Here Is the method:
    Java Code:
    public MidiEvent makeEvent(int comd, int chan, int one, int two, int tick) {
    		try {
    			ShortMessage a = new ShortMessage();
    			a.setMessage(comd, chan, one, two);
    			MidiEvent event = new MidiEvent(a, tick);
    		} catch(Exception ex) {
    			ex.printStackTrace();
    		}
    
    		return event;
    	}

  3. #3
    Jacob1028555 is offline Member
    Join Date
    Jun 2011
    Posts
    20
    Rep Power
    0

    Default

    HERE IS THE ERROR:
    Java Code:
    Updating property file: /home/jacob/NetBeansProjects/ScienceFairRMI/build/built-jar.properties
    Compiling 6 source files to /home/jacob/NetBeansProjects/ScienceFairRMI/build/classes
    /Jacob/Source/VisualMusicService.java:37: class, interface, or enum expected
            public MidiEvent makeEvent(int comd, int chan, int one, int two, int tick) {
                   ^
    /Jacob/Source/VisualMusicService.java:40: class, interface, or enum expected
                            a.setMessage(comd, chan, one, two);
                            ^
    /Jacob/Source/VisualMusicService.java:41: class, interface, or enum expected
                            MidiEvent event = new MidiEvent(a, tick);
                            ^
    /Jacob/Source/VisualMusicService.java:42: class, interface, or enum expected
                    } catch(Exception ex) {
                    ^
    /Jacob/Source/VisualMusicService.java:44: class, interface, or enum expected
                    }
                    ^
    /Jacob/Source/VisualMusicService.java:47: class, interface, or enum expected
            }
            ^
    6 errors
    /home/jacob/NetBeansProjects/ScienceFairRMI/nbproject/build-impl.xml:413: The following error occurred while executing this line:
    /home/jacob/NetBeansProjects/ScienceFairRMI/nbproject/build-impl.xml:199: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 2 seconds)

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,252
    Blog Entries
    1
    Rep Power
    24

    Default

    Can we see some more code, especially the code around this method. Are you declaring a method inside of another method for instance?

  5. #5
    Jacob1028555 is offline Member
    Join Date
    Jun 2011
    Posts
    20
    Rep Power
    0

    Default

    *CLOSED*
    I found out the problem

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,252
    Blog Entries
    1
    Rep Power
    24

    Default

    Quote Originally Posted by Jacob1028555 View Post
    *CLOSED*
    I found out the problem
    Great. Now please have the courtesy of sharing your problem and its solution with us.

Similar Threads

  1. ugh another method that isn't working
    By jjth39347 in forum New To Java
    Replies: 14
    Last Post: 04-17-2011, 09:57 PM
  2. Why isn't my toString method working
    By arri3oi in forum New To Java
    Replies: 7
    Last Post: 12-13-2010, 05:34 AM
  3. dispose() method not working
    By R&R in forum New To Java
    Replies: 19
    Last Post: 11-15-2010, 01:46 AM
  4. Can't find out how to get this method working :)
    By Shadaw in forum Java Applets
    Replies: 2
    Last Post: 12-29-2008, 05:35 PM
  5. makeButton method not working
    By ljk8950 in forum AWT / Swing
    Replies: 8
    Last Post: 08-10-2008, 10:20 PM

Tags for this Thread

Posting Permissions

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