Is it possible to add a component (e.g. a JPanel representing a banner) above the menubar in a frame, but below the header/title bar? If so, could you please point me in the right direction.
Darryl's solution is probably the proper solution but it is more involved than just changing the layout manager. You would also need to create a custom JRootPane which would need to be added to the frame. It would need methods like addBanner(...), getBanner(...).
Another approach might be to just add the menubar directly to the content pane:
Another approach might be to just add the menubar directly to the content pane:
I was thinking more in terms of using a JMenuBar as a header and nesting another JRootPane.This approach could of course benefit from extending JFrame to get a class that forwards add/remove/setLayout/getLayout to the inner root pane's contentPane.
Yet another approach (almost the same as yours) could be to nest the banner and menu bar in a JMenuBar with GridLayout(0, 1) or BoxLayout.VERTICAL or ...