package Current.popups.AnimatedWord; import Current.*; import Current.manage.*; import java.awt.*; import java.awt.event.*; import java.io.Serializable; public class AnimatedWordContainer extends Container { protected Manager M; public AnimatedWordCanvas A; public AnimatedWordControlCanvas AC; public Container C; /** Creates a new instance of UnfoldContainer */ public AnimatedWordContainer(Manager M) { this.M=M; M.addListener(this); // the order of these lines is becoming quite delicate // ...ugh C=new Container(); C.setLayout(new BorderLayout()); A=new AnimatedWordCanvas(M,this); AC=new AnimatedWordControlCanvas(M,A); A.addAnimatedWordControlCanvas(AC); AC.addAnimatedWordContainer(this); A.setSize(350,250); AC.setSize(350,145); setLayout(new BorderLayout()); add(A,"Center"); add(AC,"South"); setBackground(Color.black); } /** This must be called when the containing popup is closed, so that * the manager no longer tries to contact these components. */ public void mcbCleanup() { M.remove(AC); M.remove(A); } }