Question

This is how it looks contained in a BorderLayout:

jmenubar borderlayout

And this is how I want it to look:

jmenubar null layout

As you can see it's not at the top of the frame. Is there any way I can fix that?

Was it helpful?

Solution

You shouldn't set JMenuBar by using BorderLayout at all. Instead of that, simply call setJMenuBar method from your JFrame instance.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top