Yurttas/PL/OOL/Java/F/05/02/03/00/Menu00.java
Jump to navigation
Jump to search
1/**
2 * Copyright(C) 1998
3 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for EDUCATIONAL purposes
7 * and without fee is hereby granted provided that this
8 * copyright notice appears in all copies.
9 *
10 * @date : January 1, 1998.
11 * @author : Salih Yurttas.
12 */
13
14
15import java.awt.*;
16
17import java.awt.event.*;
18
19public class Menu00 extends Frame
20 implements ActionListener {
21
22 static public void main(String[] args) {
23 Frame f = new Menu00();
24
25 f.setSize(320,160);
26 f.show();
27 }
28
29 private static MenuBar mB;
30 private static Menu m;
31
32 public Menu00() {
33 super("Menu - 00");
34 mB = new MenuBar();
35
36 m = new Menu("Search");
37
38 m.add("LinearSearch");
39 m.addActionListener(this);
40 mB.add(m);
41
42 setMenuBar(mB);
43 }
44
45 public void actionPerformed(final ActionEvent aE) {
46 System.out.println(aE.getActionCommand());
47 }
48
49}