Solved

Import Java.awt.*; Import Java.applet.*;

Question 67

Short Answer

import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class JSound extends JApplet
{
AudioClip sound;
public void init()
{
sound = getAudioClip(getCodeBase(),"mysteryTune.au");
}
public void start()
{
___________________________________
}
public void stop()
{
___________________________________
}
public void paint(Graphics g)
{
super.paint(g);
Graphics2D g2D = (Graphics2D)g;
g2D.drawString("Listen to the mystery tune ", 10, 10);
}
}
In the first shaded line provided, write the loop() method to play the mysteryTune.au sound continually. On the second shaded line, write the stop() method to halt the mysteryTune.au sound file.

Correct Answer:

verifed

Verified

sound.loop...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents