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 item to this menu. /// </summary> public MenuItem add(MenuItem @mi) { return default(MenuItem); }
/// <summary> /// Inserts a menu item into this menu /// at the specified position. /// </summary> public void insert(MenuItem @menuitem, int @index) { }