

import java.awt.*;
import javax.swing.*;
public class TextFonts extends JApplet
{
public void paint ( Graphics g )
{
super.paint( g );
g.drawString ("Hello World", 0, 10);
Font small = new Font( "Serif", Font.PLAIN, 8 );
g.setFont( small );
g.drawString (*Java rocks", 0, 50 );
g.drawstring ("Hiya", 60, 15 );
// font stays the same until we call setFont again
Font big = new Font( "SansSerif", Font.BOLD + Font.ITALIC, 36 );
g.setFont( big );
g.drawString ( "Skiing is fun", 50, 50 );
{
{

public class TextFonts extends JApplet {
public void paint ( Graphics g ) {
super.paint( g );
g.drawString ("Hello World", 0, 10);
Font small = new Font( "Serif", Font.PLAIN, 8 );
g.setFont( small );
g.drawString (*Java rocks", 0, 50 );
g.drawstring ("Hiya", 60, 15 );
// font stays the same until we call setFont again Font big = new Font( "SansSerif", Font.BOLD + Font.ITALIC, 36 );
g.setFont( big );
g.drawString ( "Skiing is fun", 50, 50 );
{ {