Search:

Type: Posts; User: mwardjava92

Search: Search took 0.11 seconds.

  1. Replies
    8
    Views
    1,556

    Re: Menus will not appear in JMenubar

    I played around with the code and I removed 'frame.' from the setJMenuBar() method and it worked. Thanks man
  2. Replies
    8
    Views
    1,556

    Re: Menus will not appear in JMenubar

    Yes line 87 was in the main() method. I moved the code to the constructor, but now I am getting this error:

    MenuExample.java:76: cannot find symbol
    symbol : variable frame
    location: class...
  3. Replies
    8
    Views
    1,556

    Re: Menus will not appear in JMenubar

    MenuExample.java:87: non-static variable menuBar cannot be referenced from a static context
    frame.setJMenuBar(menuBar);
    ^
  4. Replies
    8
    Views
    1,556

    Re: Menus will not appear in JMenubar

    I've tried adding 'frame.setJMenuBar(menuBar);' but it gives me an error. Am I on the right track?
  5. Replies
    8
    Views
    1,556

    Menus will not appear in JMenubar

    I have created 2 JMenus with various JButtons, JCheckboxes and a submenu. They are compiling and running ok. The problem is that they filling the full length of the JFrame, instead of appearing as...
Results 1 to 5 of 5