You are on page 1of 3

Applets

Applets are small java programs which can be transported over


internet from one computer to another and run by using
appletviewer or web browsers.applets are not full featured
applications programs.
Limitations of applets
1. Applets do not use main function
2. Applets can not read / writes files in local computer
3. Applets can not communicate with other servers on the
network
4. Applets can not run any programs from local computer
5. Applet are restricted to use libraries from other languages
such as c or c++

Life cycle of applet


 init()
 start()
 stop
 destroy
init(): Which will be executed whenever an applet program start
loading, it contains the logic to initiate the applet properties.
start(): It will be executed whenever the applet program starts
running.
stop(): Which will be executed whenever the applet window or
browser is minimized.
destroy(): It will be executed whenever the applet window or
browser is going to be closed (at the time of destroying the
applet program permanently).
List of methods

Ob.drawString(s1,10,20);
Ob.drawRect(10,10,40,60);
Ob.setColor(Color.yellow);
Ob.drawOval(30,30,50,80);
Ob.setColor(Color.green);
Ob.drawLine(100,200,150,300);
Ob.fillRoundRect(10,10,30,20);
Ob.fillOval(10,20,50,80);
Ob.fillArc(10,20,50,60,180,180);

You might also like