I have incorporated a TextArea in the panel of my JFrame that also has a Canvas and numerous button. When I attempt to access the JMenuItems from the menu bar, the options are hidden under the TextArea. I've tried adding the JMenuBar as the last segment of code, but that seems to have no affect. If you run the code below and try to access the File menu, you'll see what I mean. SOMEONE PLEASE HELP!! import java.awt.event.*; import java.io.*; import java.awt.Window; import java.awt.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.border.*; import java.lang.*;
public static void main(String[] args) { getHelpuserInterface = new getHelp(); userInterface.init(); } private void init() { JFrame frame = new JFrame("HelpMe");
frame.addWindowListener(new BasicWindowMonitor()); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); //JMenu editMenu = new JMenu("Edit"); JMenu toolsMenu = new JMenu("Tools"); JMenu helpMenu = new JMenu("Help"); Open = new JMenuItem("Open"); Close = new JMenuItem("Close"); //Save = new JMenuItem("Save"); SaveAs = new JMenuItem("Save As..."); Print = new JMenuItem("Print"); Exit = new JMenuItem("Exit"); //Undo = new JMenuItem("Undo"); Mode = new JMenuItem("Switch Mode"); ClearText = new JMenuItem("Clear Text"); ClearScreen = new JMenuItem("Clear Screen"); Execute = new JMenuItem("Execute"); Index = new JMenuItem("Index"); About = new JMenuItem("About TurtleWorld2001");