FileDocCategorySizeDatePackage
Writing.javaAPI DocExample774Thu Feb 03 08:18:02 GMT 2000None

Writing

public class Writing extends Frame

Fields Summary
Font
f1
Font
f2
Font
f3
Constructors Summary
public Writing()

  setTitle( "Writing" );
      setSize( 400, 300 );
      setVisible( true );
      f1 = new Font( "SanSerif", Font.BOLD, 20 );
      f2 = new Font( "Serif", Font.ITALIC, 24 );
      f3 = new Font( "Monospaced", Font.PLAIN, 30 );
   
Methods Summary
public static voidmain(java.lang.String[] args)

  new Writing();
   
public voidpaint(java.awt.Graphics g)

  g.setFont( f1 );
      g.drawString( "Hello", 10, 50 );
      g.setFont( f2 );
      g.drawString( "Hello", 10, 150 );
      g.setFont( f3 );
      g.drawString( "Hello", 10, 250 );