import java.awt.geom.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class LF extends JFrame
 {
  Container cont;
  boolean eggit=false,visi=true;
  Color wheat= new Color(190,170,120);
  K bk=new K(255,255,255,255);
  String name,title;
  Rec rec=new Rec(30,30,500,400);
  Vector kids=new Vector();
  M parent;
  Te te;
  public LF() { }
  public LF(M parent,String name,Rec rec,boolean v,boolean x,String t)
   {
    super(t);
    this.parent=parent;
    title=t;
    setBackground(Color.lightGray);
    //frame.getContentPane().setLayout(new BorderLayout());
    te=parent.te;
    init(name,rec,v,x);
   }
  void init(String name,Rec rec,boolean v,boolean x)
   {
    this.name=name;
    this.rec=rec;
    visi=v;
    eggit=x;
    setVisible(visi);
    if(eggit)
     {
      addWindowListener (new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); }});
     }
    else
     {
      addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); } });
     }
    //parent.cont=cont;
    //parent.lf=this;
    //te.Conth.put(name+"cont",cont);
    setBackground(bk.c);
    setTitle(name);
    setLocation(rec.xi,rec.yi);
    setSize(rec.wi,rec.hi);
    cont=this.getContentPane();
    BoxLayout box = new BoxLayout(cont, BoxLayout.X_AXIS);
    cont.setLayout(box);
    Te.LFh.put(name,this);
   }
  void tta(String s) { parent.tta(s); }
  public void dofin()
   {
    try { finalize(); }
    catch (Throwable e) { }
   }
 }
