JMenuBar at the top of BorderLayout [closed]
-
21-12-2019 - |
Question
This is how it looks contained in a BorderLayout
:
And this is how I want it to look:
As you can see it's not at the top of the frame. Is there any way I can fix that?
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