need media plalyer source code in java....

yadavundertaker mohit

yadavundertaker mohit

@yadavundertaker-0p3HBs Oct 26, 2024
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

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Mahesh Dahale

    Mahesh Dahale

    @mahesh-E2tZ3t Nov 18, 2009

    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

       <html>
      <head>
      <title>
       
       Sound Applet </title>
      <body bgcolor="FFCCFF">
       
      <marquee bgcolor="#0000ff"loop="20"scrollamount="5"width="100%"<center>
      <H1><font color="#FF000">Sound Applet </font></H1></center></marquee><br>
       
      <br><br><br>
       
      <center><applet code="soundApplet.class" width=400 height=300></center>
       
      </applet>
      </body>
      </html>
      
    [​IMG]
  • yadavundertaker mohit

    yadavundertaker mohit

    @yadavundertaker-0p3HBs Nov 18, 2009

    thanks mahesh...
  • oldboy1985

    oldboy1985

    @oldboy1985-MqDQ0e Nov 19, 2009

    thanks
    i also needed that one