赞
踩
I'm making some mini java games and I was wondering how I can add sound/music to my programs. I watched a video on youtube and followed the code provided, however I get the following error:
java.io.IOException: could not create audio stream from input stream
I noticed that others have asked the same question with the same code but the answers were not helpful. Here is the code:
import sun.audio.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
public class Project1
{
public static void main(String[] args)
{
JFrame frame = new JFrame();
frame.setSize(200,200);
frame.setLocationRelativeTo(null);
JButton button = new JButton("Click me");
frame.add(button);
button.addActionListener(new AL());
frame.setVisib
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。