// (c) 1998 Ekkehard Kraemer (ekraemer@pluto.camelot.de) import java.awt.*; /** * The frame of the main window. Sets up the layout manager and * handles the WINDOW_DESTROY event. *
* Source * * @see BojngAppl * @see Bojng * @see Stats */ class BojngFrame extends Frame { /** Layout setup */ BojngFrame(Bojng b,Stats s,Label l) { super("Bojng"); bojng=b; setResizable(false); setLayout(new BorderLayout()); setBackground(Color.black); add("North",s); add("Center",b); add("South",l); pack(); show(); b.standardPos=b.location(); } /** Handles WINDOW_DESTROY. */ public boolean handleEvent(Event e) { switch (e.id) { case Event.WINDOW_DESTROY: hide(); bojng.kill(); dispose(); return true; } return false; } Bojng bojng; // the game client window }