public Daleks() : super("Daleks") { setSize(1020, 820); setResizable(false); this.addWindowListener(new FrameListener()); var menuBar = new MenuBar(); this.setMenuBar(menuBar); var menu = new Menu("File"); menuBar.add(menu); var menuItem = new MenuItem("New Game"); menu.add(menuItem); menuItem.addActionListener(p => newGame()); menuItem = new MenuItem("-"); menu.add(menuItem); menuItem = new MenuItem("Exit"); menu.add(menuItem); menuItem.addActionListener(p => dispose()); this.setLayout(new BorderLayout()); this.add(status = new Label("To start: File > New Game"), BorderLayout.SOUTH); this.keyHandler = new KeyHandler(this); this.addKeyListener(keyHandler); this.timer = new Timer(true); }
/// <summary> /// Adds the specified menu to the menu bar. /// </summary> public Menu add(Menu @m) { return default(Menu); }
/// <summary> /// Sets the specified menu to be this menu bar's help menu. /// </summary> public void setHelpMenu(Menu @m) { }