Tested
on:
Software: Windows 8, Jdk 1.6, Netbeans IDE
Hardware: Intel Core i3, 4 GB RAM, 500 GB HDD
Software: Windows 8, Jdk 1.6, Netbeans IDE
Hardware: Intel Core i3, 4 GB RAM, 500 GB HDD
Source
Code
@Author: Praveen
Kanwar
import java.applet.*;
import java.awt.*;
/*<applet code="SimpleApplet" width=500 height=500> </applet> */
public class SimpleApplet extends Applet
{
public void init()
{
setForeground(Color.RED);
setBackground(Color.BLUE);
}
public void paint(Graphics g)
{
Font f=new Font("Arial",Font.ITALIC,20);
g.setFont(f);
g.drawString("Welcome to Applet Programming!",50,50);
}
}
import java.applet.*;
import java.awt.*;
/*<applet code="SimpleApplet" width=500 height=500> </applet> */
public class SimpleApplet extends Applet
{
public void init()
{
setForeground(Color.RED);
setBackground(Color.BLUE);
}
public void paint(Graphics g)
{
Font f=new Font("Arial",Font.ITALIC,20);
g.setFont(f);
g.drawString("Welcome to Applet Programming!",50,50);
}
}
Output
Post a Comment