.class public DemoFont

.super java/applet/Applet

.field private protected font1 Ljava/awt/Font;
.field private protected font2 Ljava/awt/Font;
.field private protected font3 Ljava/awt/Font;

.method public <init>()V
  .limit locals 1
  .limit stack 1
  aload_0
  invokenonvirtual java/applet/Applet/<init>()V
  return
.end method

.method public init()V
  .limit locals 2
  .limit stack 5
  new joos/lib/JoosConstants
  dup
  invokenonvirtual joos/lib/JoosConstants/<init>()V
  astore_1
  new java/awt/Font
  dup
  ldc "TimesRoman"
  aload_1
  invokevirtual joos/lib/JoosConstants/BOLD()I
  ldc 12
  invokenonvirtual java/awt/Font/<init>(Ljava/lang/String;II)V
  aload_0
  swap
  putfield DemoFont/font1 Ljava/awt/Font;
  new java/awt/Font
  dup
  ldc "Courier"
  aload_1
  invokevirtual joos/lib/JoosConstants/ITALIC()I
  ldc 24
  invokenonvirtual java/awt/Font/<init>(Ljava/lang/String;II)V
  aload_0
  swap
  putfield DemoFont/font2 Ljava/awt/Font;
  new java/awt/Font
  dup
  ldc "Helvetica"
  aload_1
  invokevirtual joos/lib/JoosConstants/PLAIN()I
  ldc 14
  invokenonvirtual java/awt/Font/<init>(Ljava/lang/String;II)V
  aload_0
  swap
  putfield DemoFont/font3 Ljava/awt/Font;
  return
.end method

.method public paint(Ljava/awt/Graphics;)V
  .limit locals 2
  .limit stack 4
  aload_1
  aload_0
  getfield DemoFont/font1 Ljava/awt/Font;
  invokevirtual java/awt/Graphics/setFont(Ljava/awt/Font;)V
  aload_1
  ldc "TimesRoman 12 point bold."
  ldc 20
  ldc 20
  invokevirtual java/awt/Graphics/drawString(Ljava/lang/String;II)V
  aload_1
  aload_0
  getfield DemoFont/font2 Ljava/awt/Font;
  invokevirtual java/awt/Graphics/setFont(Ljava/awt/Font;)V
  aload_1
  ldc "Courier 24 point italic."
  ldc 20
  ldc 40
  invokevirtual java/awt/Graphics/drawString(Ljava/lang/String;II)V
  aload_1
  aload_0
  getfield DemoFont/font3 Ljava/awt/Font;
  invokevirtual java/awt/Graphics/setFont(Ljava/awt/Font;)V
  aload_1
  ldc "Helvetica 14 point plain."
  ldc 20
  ldc 60
  invokevirtual java/awt/Graphics/drawString(Ljava/lang/String;II)V
  return
.end method

