Java applet program that displays a simple message

Sunday, October 4th, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.awt.*;
import java.applet.*;
/*
 <applet code="sim" width=300 height=300>
 </applet>
 */
 public class sim extends Applet
 {
 		String msg=" ";
 		public void init()
 		{
 				msg+="init()--->";
 				setBackground(Color.orange);
 		}
 		public void start()
 		{
 			msg+="start()--->";
 			setForeground(Color.blue);
 
 		}
 		 public void paint(Graphics g)
 		{
 			msg+="paint()--->";
 			g.drawString(msg,200,50);
 		}
 }

Output:

Java Applet program output

Java Applet program output

Avatar Image

Author Name :
Ranjith

Total : 1 Comment


1 Response to Java applet program that displays a simple message

  1. Suresh

    Very Good and Useful Programs Written by You …..
    Thanks a lot For these type of Programs…

    Suresh

Leave a Reply

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup