-
HELP needed!!!!
i have a problem here. i got this program but its sound only play in window 2000, but not in window xp. whats the problem........
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class HWApplet extends Applet implements ActionListener
{
Button hello;
Button world;
AudioClip helloClip;
AudioClip worldClip;
public void init()
{
super.init();
setLayout(new FlowLayout());
hello = new Button("Hello");
hello.addActionListener(this);
add(hello);
world = new Button("World");
world.addActionListener(this);
add(world);
helloClip = getAudioClip(getCodeBase(),"com.au");
worldClip = getAudioClip(getCodeBase(),"carstart.wav");
}
public void actionPerformed(ActionEvent event)
{
String cmd = event.getActionCommand();
if (cmd.equals("Hello")) {
helloClip.play();
} else if (cmd.equals("World")) {
worldClip.play();
}
}
}
-
Do you get any error messages?
ArchAngel.
O:-)
-
oh i jus solve it myself recently thanks anyway.......
-
It'd be kinda helpful if you posted how you solved the problem so that if anyone else gets this problem we can refer them to this post.
ArchAngel.
O:-)
-
oh its jus that the verison of JDK is different that why some computer it works btu not for others
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks