hello friend this is the code of my splash screen i want to play a background music when this screen is appears who can i do that i have "hbd.au" file.which i want to play at back ground.I also want to stop the music when it end i.e recursive playback must not happen.
And i also want to know which type of music file can i use at background.
Here is the code of splash screen

import java.awt.*;
import javax.swing.*;

public class bdrsplash extends JWindow implements Runnable
	Thread t;
	Image i;
	ImageIcon ii;
	int x = 0;
		t = new Thread( this, "hhh" );
		ii = new ImageIcon( "bdr.png" );
		i = ii.getImage();
		setBounds( 150, 150, 640, 480 );
		setVisible( true );
	public void run()
			while( x < 600)
				x += 5;
				t.sleep( 100 );
			t.sleep( 500 );
		}catch( Exception e ){}
		//this.setVisible( false );
                //call to the other class
		mainscreen me = new mainscreen();
	public void paint( Graphics g )
		g.drawImage( i, 0, 0, this );
		g.setColor( Color.BLACK );
		g.drawString( ( x * 100 ) / 600 + "%", 588, 442 );
		g.fillRect( 23,428, x, 20 );
	public static void main( String args[] )
		new bdrsplash();

Thanx.And have a good day!

For playing sound, you can use the Java Sound API. Specifically, it sounds like the section in this article on Using a Clip is relevant to what you are trying to do.

thanks for your replay but it is very complicated. I found solution on it
here i change i made to play music at background.
i give only changes in the above code.

import javax.sound.sampled.Clip;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.AudioInputStream;
import java.net.*;
          t.sleep(175);//made changes according to your music file time and progress bar

public static void main( String args[] )throws Exception
		URL soundLocation = new URL("file:D:/BDRFINAL/happybirthday.au");//url of the file
		Clip clip = AudioSystem.getClip();

    	AudioInputStream inputStream =AudioSystem.getAudioInputStream(soundLocation);
    	clip.open( inputStream );
    	clip.loop(01);//no of loops you want to play 
	new bdrsplash();

any buddy want more info. then you serch here
and have other code for play background music

import java.io.File;
import java.io.FileInputStream;
import sun.audio.AudioPlayer;
import sun.audio.AudioStream;
public class PlaySample
	public static void main(String[] parms)
			AudioStream song = new AudioStream(new FileInputStream(new File("D:\\BDRFINAL\\happybirthday.au")));
		catch(Exception ex)