More code. Note that this is also taken from the lecture slides.
From this code you can see that there are a few things going on here. Firstly, a new JMenuBar is created. This is the root from which all other JMenus will stem and is possibly the most important thing here! Note that the frame in frame.setJMenuBar is the same frame used in the previous section. Once you have your base JMenuBar, you can add in a JMenu which is like the File, Edit, View, Tool, Help and so on that you see on a lot of applications. Finally, a JMenuItem must be added so your menus can have some options. So after all this, your application will have a menubar with a File menu, on which would be Open and Quit.
Okay, so you have menus. But what if you want them to do something? The answer, my friend, is not blowing in the wind (Farking xmms...) it is in fact the ActionListener interface.