I can't find the components specified in the title anywhere in IntelliJ's Palette. I notice that the form has a JMenuBar, but I don't see it, and I don't know how to access it. Is there any way of using these components visually?
How can I add JMenuBars,JMenus and JMenuItems using IntelliJ's Swing GUI Designer?
Asked Answered
You don't "add" JMenuBars to a form in Swing; you call myFrame.setJMenuBar(theMenuBar). So that's probably why you can't drag-and-drop them. Unfortunately, that's all the help I can give you. Maybe you right-click on the form object or something, like you do in NetBeans. –
Mispleading
In NetBeans you can drag & drop them. You can also drag them in Visual Swing 4 Eclipse, so, not being able to do the same thing in IntelliJ is odd. –
Allopathy
Well, I think it used to be that you couldn't drag and drop them. At least that sticks in my head for some reason. Is there a tree of components like there is in NetBeans? –
Mispleading
Yes, there is.In both IntelliJ and Visual Swing. –
Allopathy
Can you right-click the JFrame in the tree and select to add a JMenuBar? That's the way I've done it in NetBeans before. –
Mispleading
JFrame is not included in the palette. Right clicking the JFrame doesn't show a JMenuBar option. –
Allopathy
Creating menus like this isn't currently available in the IntelliJ designer. Their official solution is to use the JFormDesigner plugin for intelliJ. Or of course to code them by hand. Here is a link to the discussion in their forums :-
Thanks, jT
@Joao that link has become malicious. Just FYI. –
Phototopography
I think I'm missing context re the above comment. The link redirects to intellij-support.jetbrains.com and is fine. Maybe it refers to some comments that were since deleted. –
Ryals
© 2022 - 2024 — McMap. All rights reserved.