There. Got it working.
Type: Posts; User: Archibold9
There. Got it working.
I know how to do this.. Its sound that confuses me.
How would i fix that..? Yes. I am a noob.
You told me it was wrong D: I'm not good at sounds in java.....
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...
Okay thanks for your help. I'll go do it now >.<
No how would i make that variable?
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.
run this=Bluemoon.PlaySound$1@1d23e75
Yes. I pasted it, man. It told me the run() method was in PlaySound, which it is..
Yes. I pasted it, man. But it told me run is in PlaySound, which it is.
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.
So it plays sound on your system??
Error Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: Bluemoon.PlaySound.run
at...
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...
The 'PlaySound' class.
Combine this with the PlaySound class [Java] public class NewJFrame extends javax.swing.JFrame { /** Creates new form - Pastebin.com
PlaySound s = new PlaySound();
private void BeginActionPerformed(java.awt.event.ActionEvent evt) {
text1.setText("")
Begin.setVisible(false);
choice1.setVisible(true);
health.setVisible(true);...
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.
Cannot find symbol
symbol: method run()
location Bluemoon.PlaySound
P.s I'm using netbeans because it has the JFrame editor.
An error comes under
s.run(); saying cannot find symbol.
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.*;...