Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Problem with JMenuBar(Solved)

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Problem with JMenuBar(Solved)

    Hi!
    So im trying to make a simple drawing program and on the top of the screen im going to have a bar with dropdown menus with different colors and tools etc. My class that includes the methods used to build up the JFrame inherits from the class JFrame. But if i then set up my bar and try to add it, nothing shows up. It's like it's there because i can't paint on it but i can't see anything. However it works if i use MenuBar instead of JMenuBar. And JMenuBar only works if I create a object of the class JFrame and use that variable to set it up instead. I think the JMenuBar looks nicer then the MenuBar so i want to use that one.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Problem with JMenuBar

    Can you make a small, complete program that compiles, executes and shows the problem?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Problem with JMenuBar

    Im sorry for the delay but i think I know what the problem is so it's fine now.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Problem with JMenuBar

    Please mark as solved.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Menus will not appear in JMenubar
    By mwardjava92 in forum AWT / Java Swing
    Replies: 8
    Last Post: March 19th, 2013, 04:02 PM
  2. Replies: 3
    Last Post: January 5th, 2012, 01:44 AM
  3. JMenuBar disappears half the time when using a certain line of code?
    By !Marcus in forum Java Theory & Questions
    Replies: 2
    Last Post: December 26th, 2011, 04:05 PM
  4. Replies: 33
    Last Post: May 25th, 2011, 06:59 AM
  5. [SOLVED] [Problem] imports javax.swing problem
    By Brollie in forum AWT / Java Swing
    Replies: 8
    Last Post: July 5th, 2009, 07:59 AM