import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

/**
 * Welcome to the happy little window wherein the
 * evil Emperor appears to taunt and vex the poor
 * little human player!
 * once finished, this window requires that the
 * associated image files be stored in the same 
 * directory as the tauntWindow.class file
 *
 * ~aplatt, game/ai team
 * 
 */

public class tauntWindow extends JFrame{
   public static final int WIDTH = 400;
   public static final int HEIGHT = 400;
   public static final String file1 = "emp1.jpg";
   public static final String file2 = "emp2.jpg";
   public static final String file3 = "emp3.jpg";
   public static final String taunt1 = "<html>I will boil you " +
       "alive<br>Worthless Rebels!</html>";
   public static final String taunt2 = "<html>Vile Scum!<br>" +
       "You will all be fed to my vampire rabbits!</html>";
   public static final String taunt3 = "<html>Fee Fi Fo Foo! " +
       "I smell the stink of . . . YOU!</html>";


   public tauntWindow(){
      super();
      setSize(WIDTH,HEIGHT);
      setTitle("Live In Fear");
      Container content = getContentPane();
      content.setBackground(Color.black);
      content.setLayout( new BorderLayout() );
      content.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                contentMouseClicked(evt);
            }

      });

      // when images are made, comment OUT the next two lines
      // JLabel tempLabel = new JLabel("Image coming soon!!");
      // content.add(tempLabel);

      // when images are made, comment IN the next few lines
      //
       int pickPic = (int)(Math.random()*3)+1;
       ImageIcon i;
       if(pickPic == 1){
          i = new ImageIcon(Toolkit.getDefaultToolkit().getImage(file1));
       }
       else if(pickPic == 2){
	  i = new ImageIcon(Toolkit.getDefaultToolkit().getImage(file2));
       }
       else
	  i = new ImageIcon(Toolkit.getDefaultToolkit().getImage(file3));
      
       JLabel picLabel = new JLabel(i);
       picLabel.setBounds(0,0,200,290);
       content.add(picLabel, BorderLayout.NORTH);

       String x;
       int pickLine = (int)(Math.random()*3)+1;
       if( pickLine == 1 )
	   x = taunt1;
       else if( pickLine == 2 )
           x = taunt2;
       else x = taunt3;
       
       JLabel messageLabel = new JLabel(x);
       messageLabel.setBounds(0,290,200, 50);
       content.add(messageLabel, BorderLayout.SOUTH);

   }


    private void contentMouseClicked(java.awt.event.MouseEvent evt) {
	fitg.thisGame.setDone();
        this.dispose();
    }


    public static void main(String args[]){
	tauntWindow x = new tauntWindow();
        x.setVisible(true);
    }

}
