java - Why doesn't my applet appear in my browser? -
i'm pretty new java , completey new applets. first time trying run applet. problem applet doesn't appear in browser when open html file.
here's html file:
<html> <head> <title>java applet demo</title> </head> <body> <applet code = "displaylabel.class" width = "250" height = "50" align = "center"> </applet> </body> </html> and java code
import javax.swing.*; public class displaylabel extends japplet { public displaylabel() { add(new jlabel("great", jlabel.center)); } } i placed both files same path folder , tried open html file, applet doesn't appear. when run applet eclipse or run html applet viewer in command, applet appears. why this? browser setting?
Comments
Post a Comment