Search:

Type: Posts; User: Archibold9

Search: Search took 0.10 seconds.

  1. Replies
    8
    Views
    1,589

    Re: Creating a class to play sounds.

    There. Got it working.
  2. Replies
    8
    Views
    1,589

    Re: Creating a class to play sounds.

    I know how to do this.. Its sound that confuses me.
  3. Replies
    8
    Views
    1,589

    Re: Creating a class to play sounds.

    How would i fix that..? Yes. I am a noob.
  4. Replies
    8
    Views
    1,589

    Re: Creating a class to play sounds.

    You told me it was wrong D: I'm not good at sounds in java.....
  5. Replies
    8
    Views
    1,589

    Creating a class to play sounds.

    I have a main GUI JFrame class and i want to play .wav sounds when a button is pressed. I've configured everything in the GUI and now i just need to make a sound class which plays a song, located in...
  6. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Okay thanks for your help. I'll go do it now >.<
  7. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    No how would i make that variable?
  8. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    I'm a noob but how would this help me? Would i change
    PlaySound s = new PlaySound(); to
    PlaySound$1 s = new PlaySound$1(); Because i tried that and it didn't work.
  9. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    run this=Bluemoon.PlaySound$1@1d23e75
  10. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Yes. I pasted it, man. It told me the run() method was in PlaySound, which it is..
  11. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Yes. I pasted it, man. But it told me run is in PlaySound, which it is.
  12. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Yes. It works as a single class. But what i want to do is run the method public void run() in another class when you press a button.
  13. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    So it plays sound on your system??
  14. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Error Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: Bluemoon.PlaySound.run
    at...
  15. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    package Bluemoon;
    import java.io.*;
    import javax.sound.sampled.*;

    public class PlaySound
    {
    public static void main(String[] args)
    {
    sound = new File("Bluemoon\\Song.wav"); // Write you...
  16. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    The 'PlaySound' class.
  17. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Combine this with the PlaySound class [Java] public class NewJFrame extends javax.swing.JFrame { /** Creates new form - Pastebin.com
  18. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    PlaySound s = new PlaySound();
    private void BeginActionPerformed(java.awt.event.ActionEvent evt) {
    text1.setText("")
    Begin.setVisible(false);
    choice1.setVisible(true);
    health.setVisible(true);...
  19. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    I'm trying to run the 'run' method in the PlaySound class in my main class called Bluemoon. The code you're asking me to paste is near 300 lines long.
  20. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    Cannot find symbol
    symbol: method run()
    location Bluemoon.PlaySound

    P.s I'm using netbeans because it has the JFrame editor.
  21. Replies
    32
    Views
    3,747

    Re: Adding sound to program.

    An error comes under
    s.run(); saying cannot find symbol.
  22. Replies
    32
    Views
    3,747

    Adding sound to program.

    EDIT - My main class is a JFrame gui
    I have a sound class which access' a .wav in my java package. This is the PlaySound class:

    package Bluemoon;
    import java.io.*;
    import javax.sound.sampled.*;...
Results 1 to 22 of 22