±Û¾´ÀÌ :¹ÚÀå¿ø 1999³â 3¿ù 03ÀÏ 21:06:43
SwingÀ» »ç¿ëÇÑ ¾ÖÇø´À» ¶ç¿ì·Á°í Çϴµ¥ ¾ÈµÇ´Â ±º¿ä..
appletviewer½ÇÇàÀ» ÇÏ¸é ½ÇÇàÀÌ µÇ´Âµ¥ ºê¶ó¿ìÀú·Î º¸·Á¸é º¸ÀÌÁú ¾Ê½À´Ï´Ù.
¾ÖÇø´ÀÌ ¶°¾ßÇÒ ÀÚ¸®¿¡ ȸ»öÀ¸·Î Ç¥½Ã¸¸ µÇ°í º¸ÀÌÁú ¾Ê½À´Ï´Ù.
¾ÖÇø´ À§¿¡ ¸¶¿ì½º Ä¿¼¸¦ °®´Ù°¡ ³õÀ¸¸é
status bar¿¡ ´ÙÀ½°ú °°Àº ¸Þ¼¼Áö°¡ ³ª¿À³×¿ä.
load:class HelloSwingApplet not found
¹¹°¡ À߸øµÈ °É±î¿ä
jdk1.2¸¦ ¼³Ä¡ÇÏ¿´À¸¸ç ie40À» »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù.
// ½ÇÇà
appletviewer HelloSwingApplet.html
///////// HelloSwingApplet.html ///////////////
<html>
<applet code="HelloSwingApplet.class" WIDTH = 400 HEIGHT = 50 >
</applet>
<hr>
</html>
///////// HelloSwingApplet.java ///////////////
import javax.swing.*;
import java.awt.*;
public class HelloSwingApplet extends JApplet {
public HelloSwingApplet() {
getRootPane().putClientProperty("defeatSystemEventQueueCheck",
Boolean.TRUE);
}
public void init() {
JLabel label = new JLabel(
"You are successfully running a Swing applet!");
label.setHorizontalAlignment(JLabel.CENTER);
label.setBorder(BorderFactory.createMatteBorder(1,1,2,2,Color.black));
getContentPane().add(label);
}
}