📄 a0af1e33ad69001c13ed8b3512c9cbf6
字号:
/*
* Created on 2007-9-23
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
import java.awt.*;
import java.net.*;
import java.applet.*;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class WebApplet extends Applet
{
private Image myImage;
private AudioClip mySound;
private URL ImageURL;
private URL SoundURL;
public void init()
{
resize(250,250);
try
{
ImageURL=new URL("http://www.xjtu.edu.cn/images/random_img/13.jpg");
SoundURL=new URL("http://211.157.21.210:8088/eagle/process.jsp?product_no=1002744");
}
catch(MalformedURLException e){}
myImage=getImage(ImageURL);
mySound=getAudioClip(SoundURL);
}
public void start()
{
mySound.loop();
}
public void stop()
{
mySound.stop();
}
public void paint(Graphics g)
{
g.drawImage(myImage,0,0,this);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -