How to change Font size,style & type in java applet?
Hello Friends,
Today I will explain how can we change font size,style,type in java applet.
In this program I have change font size,style,type.
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
*/
public class fourth extends Applet
{
String msg="";
public void init()
{
msg="hay....";
setBackground(Color.pink);
setForeground(Color.black);
msg +="whts up???";
}
public void paint(Graphics g)
{
g.setFont(new Font("Comic Sans MS",Font.BOLD,30));
g.drawString(msg,50,70);
}
}