The Quintessential Applet

上一篇 / 下一篇  2008-05-17 10:32:09 / 个人分类:java

Every applet must subclass Applet.
    import java.applet.*;
    import java.awt.*;
    
    public class BasicApplet extends Applet {
        // This method is called once by the browser when it starts the applet.
        public void init() {
        }
    
        // This method is called whenever the page containing this applet is made visible.
        public void start() {
        }
    
        // This method is called whenever the page containing this applet is not visible.
        public void stop() {
        }
    
        // This method is called once when the browser destroys this applet.
        public void destroy() {
        }
    
        // This method is called whenever this applet needs to repaint itself.
        public void paint(Graphics g) {
        }
    }
Here is an example of an HTML file that will cause the browser to load and start the applet:
    <applet code=BasicApplet width=100 height=100>
    </applet>

TAG: The Quintessential Applet java

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

我的栏目

日历

« 2008-08-22  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

我的存档

数据统计

  • 访问量: 113
  • 日志数: 5
  • 建立时间: 2008-05-17
  • 更新时间: 2008-05-19

RSS订阅

Open Toolbar