Java 8 AudioClip - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 AudioClip class.

This code example shows how to use the following methods:stop;
	public void stop() { 
	 * public final void setStub(AppletStub stub); 
	 * //设置Applet的stub.stub是Java和C之间转换参数并返回值的代码位,它是由系统自动设定的。 public boolean 
	 * isActive();// 判断一个Applet是否处于活动状态。 public URL getDocumentBase();// 
	 * 检索表示该Applet运行的文件目录的对象。 public URL getCodeBase();// 获取该Applet 代码的URL地址。 
	 * public String getParameter(String name);// 获取该Applet 由name指定参数的值。 public 
	 * AppletContext getAppletContext();// 返回浏览器或小应用程序观察器。 public void 
	 * resize(int width,int height);// 调整Applet运行的窗口尺寸。 public void 
	 * resize(Dimension d);// 调整Applet运行的窗口尺寸。 public void showStatus(String 
	 * msg);// 在浏览器的状态条中显示指定的信息。 public Image getImage(URL url); // 
	 * 按url指定的地址装入图象。 public Image getImage(URL url,String name);// 
	 * 按url指定的地址和文件名加载图像。 public AudioClip getAudioClip(URL url);// 
	 * 按url指定的地址获取声音文件。 public AudioClip getAudioClip(URL url, String name);// 
This code example shows how to use the following methods:loop, play
        if (alertClip == null) {
        boolean loop = true;
        if (!loop) {
        } else { 
    public void stopAllAlerts() { 
        Enumeration<String> alertClipsEnum = alertClips.keys();
        while (alertClipsEnum.hasMoreElements()) {
            String alert = alertClipsEnum.nextElement();
    public void stopAlert(String alertResourceName) {
This code example shows how to use the following methods:stop
	/** Called from the Browser when the page is being vacated. */ 
	public void stop() { 
		System.out.println("In AppletMethods.stop()");
		if (snd != null)
			snd.stop();	// stop play() or loop() 
	/** Called from the Browser (when the applet is being un-cached?). 
	 * Not actually used here, but the println will show when it's called. 
	public void destroy() { 
		System.out.println("In AppletMethods.destroy()");
	public void paint(Graphics g) {
		g.drawString("Welcome to Java", 50, 50);
	/** An alternate form of getParameter that lets 
See Code Examples for Java 8 AudioClip Methods: