http://www.welog.co.kr/gbbs/bbs/board.php?bo_table=java&wr_id=133&page=3
http://alecture.blogspot.kr/2011/05/java-applet.html
/* 수행방법 */
/* appletviewer Example.html */
import java.applet.*;
/* 그래픽 사용자를 위한 인터페이스 내장*/
import java.awt.*;
public class Example extends Applet{
public void paint(Graphics g){
g.drawString("자바 애플릿",100,60);
}
}
<html>
<head>
<title>자바애플릿예제</title>
</head>
<body><center>
<applet code="Example.class" width=400 height=200>
</applet>
</center></body>
</html>
<HelloApplet.class>
import java.awt.Color;
import java.awt.Graphics;
import java.applet.*;
import java.awt.Font;
public class HelloApplet extends Applet
{
public void init()
{
System.out.println("init method call..");
}
public void start()
{
System.out.println("start method call..");
this.setLayout(new java.awt.BorderLayout());
this.setSize(500, 500);
repaint();
}
public void stop()
{
System.out.println("stop method call..");
}
public void destroy()
{
System.out.println("destroy method call..");
}
==============================================================================
<HelloApplet.html>
<html>
<head>
<title>Nicekkong</title>
</head>
<body>
<center><br><br>
<h2><b>Current Time</b></h2><br>
<applet code ="ClockApplet" width = "500" height = "500">
</applet>
</center>
</body>
</html>
public void paint(Graphics g)
{
System.out.println("paint method call..");
g.setColor(Color.CYAN);
g.setFont(new Font("sansSerif", Font.BOLD, 30));
g.drawString("Hello Applet", 100, 100);
}
}
http://www.welog.co.kr/gbbs/bbs/board.php?bo_table=java&wr_id=133&page=3