1. DIGITAL CLOCK USING APPLET
Aim:-
To write a program digital clock using applet
Algorithm:-
1. Start the program.
2. Initialize the applet header files
3. Then get the method is print(graphics g)
4. Display result of digital clock .
5. End the program.
1
,Program:-
import java.awt.*;
import java.applet.*;
public class clock extends Applet
{
String s1;
public void print(Graphics g)
{
g.drawString("The TIME IS:",50,100);
g.drawString("9:45AM:",150,100);
}
}
//<applet code=clock width=300 height=300></applet>.
2
,Output:-
Result:-
The program was verified and executed successfully
3
, 2. DRAW OUR NATIONAL FLAG
USING APPLET
Aim:-
To write a program draw our national flag using applet
Algorithm:-
1. Start the program.
2. Initialize the applet header files
3. Then it get method is paint (graphics g)
4. To calculate result of national flag using appletviewer.
5. End the program
4
Aim:-
To write a program digital clock using applet
Algorithm:-
1. Start the program.
2. Initialize the applet header files
3. Then get the method is print(graphics g)
4. Display result of digital clock .
5. End the program.
1
,Program:-
import java.awt.*;
import java.applet.*;
public class clock extends Applet
{
String s1;
public void print(Graphics g)
{
g.drawString("The TIME IS:",50,100);
g.drawString("9:45AM:",150,100);
}
}
//<applet code=clock width=300 height=300></applet>.
2
,Output:-
Result:-
The program was verified and executed successfully
3
, 2. DRAW OUR NATIONAL FLAG
USING APPLET
Aim:-
To write a program draw our national flag using applet
Algorithm:-
1. Start the program.
2. Initialize the applet header files
3. Then it get method is paint (graphics g)
4. To calculate result of national flag using appletviewer.
5. End the program
4