HELP needed!!!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: HELP needed!!!!

  1. #1
    Join Date
    Jul 2003
    Posts
    12

    Question 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();
    }
    }
    }

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    Do you get any error messages?
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Jul 2003
    Posts
    12
    oh i jus solve it myself recently thanks anyway.......

  4. #4
    Join Date
    Mar 2003
    Posts
    834
    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:-)

  5. #5
    Join Date
    Jul 2003
    Posts
    12
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center