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:
Editorial Team
We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.
8 thoughts on “Java applet program that displays a simple message”
thank a LOT
By using text fileld we can easily show message…
good;;;
very easy to understand …NICE:):)
very good for many examples of java . Its useful to us thank you
thanks a u lot for this program.
Can anyone tell me why almost every browser doesn’t support the applet code.
I tried enabling PPAPI and NPAPI in chrome and tested it on almost all browsers that I could find.
Thank you for this simple, yet effective tutorial…
Leave a Reply
Get the latest updates on your inbox
Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.
thank a LOT
By using text fileld we can easily show message…
good;;;
very easy to understand …NICE:):)
very good for many examples of java . Its useful to us thank you
thanks a u lot for this program.
Can anyone tell me why almost every browser doesn’t support the applet code.
I tried enabling PPAPI and NPAPI in chrome and tested it on almost all browsers that I could find.
Thank you for this simple, yet effective tutorial…