View Feed
group-icon
Java Developers
Community of Java Developers: Get Java Programming Help from fellow Java Developers across the world.
654 Members
Join this group to post and comment.

need media plalyer source code in java....

can somebody provide me
source code of media player in java
i need to submit as my project and i have no lead
so if any one can
then please help
This was my MCA FY Project it will help you

   import java.awt.*;
  import java.applet.*;
  import java.net.*;
   
  public class soundApplet extends Applet
  {
              List lst;
              Button Play,Stop,Loop;
              AudioClip au;
              public void init()
              {
                          setLayout (new GridLayout());
   
                          Panel listPanel = new Panel();
                          Panel buttonPanel = new Panel();
   
                                      add ("Center", listPanel);
                                      add ("Left", buttonPanel);
   
                          listPanel.setLayout (new GridLayout());
   
                                      lst = new List();
                                         lst.addItem ("intel54");
   
                                      lst.addItem ("Windows XP Startup");
   
                                      lst.addItem ("Windows XP Shutdown");
   
                                      lst.addItem ("hi");
   
                                      lst.addItem ("notify");
                                      lst.select (0);
   
                          listPanel.add ("Center", lst);
   
                          Play = new Button ("Play");
   
                                      buttonPanel.add (Play);
   
                          Stop = new Button ("Stop");
   
                                      buttonPanel.add (Stop);
   
                          Loop = new Button ("Loop");
   
                                      buttonPanel.add (Loop);
              }
              public boolean action (Event evt, Object obj)
              {
                          String strSelection = lst.getSelectedItem() + ".au";
   
                          URL codeBase = getCodeBase();
   
                          au = getAudioClip (codeBase, strSelection);
   
                          if (evt.target == Play)
                                      au.play();
   
                          if (evt.target == Stop)
                                      au.stop();
                          if (evt.target == Loop)
                                      au.loop();
   
                                      return true;
                          }
              }
  
For HTML page

   
  
  
   
   Sound Applet 
  
   
  
  

Sound Applet





[​IMG]
thanks mahesh...
oldboy1985
oldboy1985 • Nov 19, 2009
thanks
i also needed that one

Share this content on your social channels -