import java.awt.*; 
import java.net.*;
import java.awt.event.*; 
import java.util.EventListener; 
import javax.swing.*;  
public class AJLogo extends JApplet 
 {
  static boolean isApplet=false;  
  static boolean ftt=true;
  static String[] sa;
  static L logo;
  static String dudis,loadme;
  public AJLogo() { this(true); }
  public AJLogo(boolean isA) 
   {
    isApplet = isA;  
    getContentPane().setLayout(new BorderLayout());  
    if(! isApplet)
     {
      logo=new L(this);
      logo.maine.setCodeBases(sa);
      if(logo.maine.slchat) getContentPane().add(logo.maine.lspph,BorderLayout.CENTER); 
      else getContentPane().add(logo.maine.lsppv,BorderLayout.CENTER); 
     }
   }
  public void init()
   {
    logo=new L(this);
    logo.maine.setCodeBases();
    if(getParameter("load") !=null)  logo.maine.loadme=getParameter("load");
    if(getParameter("dudis") !=null)  logo.maine.dudis=getParameter("dudis");
    if(logo.maine.slchat) getContentPane().add(logo.maine.lspph,BorderLayout.CENTER); 
    else getContentPane().add(logo.maine.lsppv,BorderLayout.CENTER); 
   }
  public static void main(String[] args) 
   {
    isApplet=false;
    sa=args;
    JFrame frame = new JFrame(); 
    frame.setTitle("AJLogo"); 
    frame.getContentPane().setLayout(new BorderLayout()); 
    AJLogo aj=new AJLogo(false);
    frame.getContentPane().add(aj, BorderLayout.CENTER); 
    frame.addWindowListener(new AppCloser());  
    frame.pack(); 
    frame.setLocation(10,10);
    //  frame.setSize(new Dimension (1260,1000));
    //  frame.setSize(new Dimension (1260,800));
    frame.setSize(new Dimension (1820,1020));
    frame.show(); 
    logo.maine.start();
   }
  public void start() { logo.maine.start(); }
  public void stop() 
   {
    System.out.println("stopping maine.te");
    logo.maine.te.stop();
    System.out.println("maine.te stopped");
   }
  public void destroy()
   {
    System.out.println("destroying");
    System.out.println("in destroy stopping maine.te");
    logo.maine.te.stop();
    System.out.println("in destroy maine.te stopped");
    // logo.maine.destroy();  mach not commented out
    System.out.println("in destroy maine destroyed");
   }
  static class AppCloser extends WindowAdapter 
   {
    public void windowClosing(WindowEvent e) { System.exit(0); }
   }
 }
