/** Assignment:  Modify this file (previously ManyFonts
 ** on p. 202 of the text) by changing it to center each 
 ** of the different fonts horizontally, and to give each        
 ** a different color. Make sure to check out SimpleApplet3 
 ** first, which shows how to do these things.  Also, edit 
 ** MyApplet6.html in the  project directory, to run the
 ** MyApplet6.class file you create, and to look nice.   **/                                                               


import java.awt.*;

public class MyApplet6 extends java.applet.Applet 
  {public void paint(Graphics g) 
      {Font f = new Font("TimesRoman", Font.PLAIN, 18);
       Font fb = new Font("TimesRoman", Font.BOLD, 18);
       Font fi = new Font("TimesRoman", Font.ITALIC, 18);
       Font fbi = new Font("TimesRoman", Font.BOLD + Font.ITALIC, 18);

       
       g.setFont(f);
       g.setColor(Color.red);
       g.drawString("Java is bout it.", 175, 25);
       
       g.setFont(fb);
       g.setColor(Color.blue);
       g.drawString("Java is da bomb.", 160, 75);
       
       g.setFont(fi);
       g.setColor(Color.green);
       g.drawString("Java is funky.", 175, 125);
       
       g.setFont(fbi);
       g.setColor(Color.black);
       g.drawString("Java is colorful.", 165, 175);
       }
    }
