アプレットを動かす
<html> <body> <applet code= "sample.class" width="100" height="200"> </applet> </body> </html>
import java.applet.Applet; import java.awt.Graphics; import java.awt.Image; import java.applet.*; import java.awt.*; public class sample extends Applet { Image img[] = new Image[1]; public void init() // 画像の読み込み { img[0] = getImage(getDocumentBase(), "sample.gif"); } public void paint(Graphics g) // 画像表示 { g.drawImage( img[0],1,1, this ); } }
-
-
cd 6100game
cd Sites/javagame/6100game
-
javac ファイル名
-
appletviewer ファイル名