// {$R Love.JFM}

import java.awt.*;
import java.applet.Applet;
import java.lang.Thread;

// Class Love
public class Love extends Applet
{
    final int MenuBarHeight = 0;

    // Component Declaration
    public Image Image1;
    public Label Label2;
    public Label Label3;
    public Label Label4;
    public Label Label5;
    public Label Label6;
    public Label Label7;
    public Label Label8;
    public Label Label9;
    public Panel Panel1;
    public Panel Panel2;
    public Label Label1;
    // End of Component Declaration

    // init()
    public void init()
    {
        // Frame Initialization
        setForeground(Color.black);
        setBackground(Color.white);
        setFont(new Font("Dialog",Font.BOLD,12));
        setLayout(null);
        // End of Frame Initialization

        // Component Initialization
        Image1 = getImage(getCodeBase(), "oneeye.gif");
        Label2 = new Label("Could live I like one-eyed fish",Label.LEFT);
        Label2.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label3 = new Label("Could love I like one-eyed fish",Label.LEFT);
        Label3.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label4 = new Label("Like the ÝïÙÍ lived swimming together",Label.LEFT);
        Label4.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label5 = new Label(" till they died to live like other two-eyed fish",Label.LEFT);
        Label5.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label6 = new Label("Could love I ",Label.LEFT);
        Label6.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label7 = new Label("like one-eyed ÝïÙÍ ",Label.LEFT);
        Label7.setFont(new Font("Helvetica",Font.PLAIN,12));
        Label8 = new Label(". . .",Label.LEFT);
        Label8.setFont(new Font("Helvetica",Font.BOLD,11));
        Label9 = new Label("- from <One-eyed fish's love> -",Label.LEFT);
        Label9.setFont(new Font("Helvetica",Font.PLAIN,11));
        Panel1 = new Panel();
        Panel1.setLayout(null);
        Panel1.setForeground(Color.black);
        Panel1.setBackground(Color.yellow);
        Panel1.setFont(new Font("Dialog",Font.BOLD,12));
        Panel2 = new Panel();
        Panel2.setLayout(null);
        Panel2.setForeground(Color.black);
        Panel2.setBackground(Color.red);
        Panel2.setFont(new Font("Dialog",Font.BOLD,12));
        Label1 = new Label("One-eyed fish's love",Label.LEFT);
        Label1.setFont(new Font("Helvetica",Font.BOLD,12));
        // End of Component Initialization

        // Add()s
        Panel2.add(Label1);
        Panel1.add(Panel2);
        add(Panel1);
        add(Label9);
        add(Label8);
        add(Label7);
        add(Label6);
        add(Label5);
        add(Label4);
        add(Label3);
        add(Label2);
        // End of Add()s

        InitialPositionSet();
    } // End of init()

    // start()
    public void start()
    {
    } // End of start()

    // stop()
    public void stop()
    {
    } // End of stop()

    // destroy()
    public void destroy()
    {
    } // End of destroy()

    public void paint(Graphics g)
    {
        // paint()
        g.drawImage(Image1, 272,11,113,57, this);
        // End of paint()
    }

    public void InitialPositionSet()
    {
        // InitialPositionSet()
        resize(393,245);
        Label2.reshape(20,55+MenuBarHeight,211,16);
        Label3.reshape(20,75+MenuBarHeight,229,16);
        Label4.reshape(20,95+MenuBarHeight,276,16);
        Label5.reshape(20,115+MenuBarHeight,299,16);
        Label6.reshape(20,135+MenuBarHeight,88,16);
        Label7.reshape(20,156+MenuBarHeight,138,16);
        Label8.reshape(21,179+MenuBarHeight,35,16);
        Label9.reshape(24,218+MenuBarHeight,216,18);
        Panel1.reshape(10,13+MenuBarHeight,252,34);
        Panel2.reshape(3,3,220,24);
        Label1.reshape(4,3,180,18);
        // End of InitialPositionSet()
    }

    public boolean handleEvent(Event evt)
    {
        // handleEvent()
        if (evt.id == Event.WINDOW_DESTROY && evt.target == this) Love_WindowDestroy(evt.target);
        else if (evt.id == Event.MOUSE_MOVE && evt.target == this) Love_MouseMove(evt.target, evt.x, evt.y, evt.modifiers);
        // End of handleEvent()

        return super.handleEvent(evt);
    }

    // Event Handling Routines
    public void Love_WindowDestroy(Object target)
    {
        System.exit(0);
    }

    public void Love_MouseMove(Object target, int x, int y, int modifiers)
    {
        Panel1.setBackground(new Color(255,x,y));
        Panel2.setBackground(new Color(255,y,x));
        Panel1.repaint();
        Panel2.repaint();
    }

    // End of Event Handling Routines

} // End of Class Love

