Hi! I want to place a JMenuItem instead of inside a JMenu directly in the JMenuBar (in a way it works). Is there a solution for this or do I have to place something else into the JMenuBar that can be used as a sort of Button and does not open a Menu. I can not use a JToolBar. Thanks, Martin
Looking at the (class hierarchy ladder at the top of the discussion section of the) api for the JMenuItem, JMenu and JMenuBar classes you can see that each class inherits from/extends JComponent and that JMenuItem extends AbstractButton. So JMenuItem is a button and it is a JComponent. Looks like you could add the JMenuItem directly to the JMenuBar.
You can thank my dental hygienist for my untimely aliveness. So tiny: