A program like that is pretty simple.
First, you'll need your main class to be a JFrame. Add a WindowListener to it
When created, you will be adding the GUI first. Create a JMenuBar, and add all the JMenus and JMenuItems you want to it. Remember to add ActionListeners to the JMenuItems so things happen when they are selected.
After everything has been added to the JMenuBar, set it as the JFrame's menubar. You can also set the icon for the frame now as well. I will explain the various options you requested after we get the textbox set up.
Now, we'll add the main typing area. Just create a JScrollPane, using a new JTextArea, and add it to the JFrame. This allows the user to type all they want, and scroll around if they need to.
Now, as for the JMenuItems, this is what you'll need:
"new": When selected, have it ask if you want to save your current work first. Use JOptionPane for this. Then, set the text in the JTextArea to an empty string.
"save": You can save files easily using the JFileChooser to have them select a file, or choose an existing one to overwrite. Then, once the file is selected, just get the contents of the JTextArea, call split("\n") to split the contents into separate lines as a String[], and use a BufferedWriter to write one line at a time to the selected file. Be sure to call the BufferedWriter's newLine() function between each line you write.
"save as": Same as the "save" choice above.
"open": Similar to "save", first ask them if they want to save the current file. Then, use a JFileChooser to have them select a file from somewhere, and use a BufferedReader to read all the lines in it. Combine them into one String, adding "\n" between each line. Then, just set the text of the JTextArea to that one String which contains all the lines of text.
Lastly, in the windowClosing method which is used by the WindowListener you added, you need to have it ask them if they want to save before closing it.
I know these aren't the most detailed instructions, but you should be able to get it from this. Just search google for any class names you need to learn how to use, and the first link will usually have all the methods and field of that class, with descriptions of them. It should resemble this page: http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/JTextArea.html