// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   Help.java

import java.awt.*;
import java.io.IOException;
import java.io.PrintStream;
import java.util.EventObject;
import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import javax.swing.text.JTextComponent;

public class Help
    implements HyperlinkListener
{

    Help()
    {
        window = new JFrame("Help");
        try
        {
            jep = new JEditorPane(getClass().getResource("Help.html"));
        }
        catch(IOException ioexception)
        {
            System.out.println(ioexception);
            JOptionPane.showMessageDialog(window, "An error occured when trying load the help file.\nFor more information on this error, you should check the Java console.", "File Load Error", 0);
            return;
        }
        jsp = new JScrollPane(jep);
        jep.addHyperlinkListener(this);
        jep.setEditable(false);
        window.setDefaultCloseOperation(2);
        window.setSize(600, 550);
        window.getContentPane().add(jsp);
        window.show();
    }

    public void hyperlinkUpdate(HyperlinkEvent hyperlinkevent)
    {
        if(hyperlinkevent.getEventType() == javax.swing.event.HyperlinkEvent.EventType.ACTIVATED)
        {
            JEditorPane jeditorpane = (JEditorPane)hyperlinkevent.getSource();
            try
            {
                jeditorpane.setPage(hyperlinkevent.getURL());
            }
            catch(Throwable throwable)
            {
                throwable.printStackTrace();
            }
        }
    }

    public static void main(String args[])
    {
        Help help = new Help();
    }

    public void show()
    {
        window.show();
    }

    JFrame window;
    JScrollPane jsp;
    JEditorPane jep;
}

