在netbeans中使用视觉摆动JPopup菜单
我想向我的应用程序添加一个弹出菜单,但是当我将它添加到我的面板时,我看到它消失了。 我如何像其他菜单一样直观地编辑 jpopup 菜单?
i want to add a popup menu to my app but when i add it to my panel i see its disappear.
how i can edit jpopup menu visualy like other menus?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在谈论在 NetBeans 中使用 matisse 视觉设计器。
在这种情况下,该过程与创建只需将其拖到屏幕上的菜单栏菜单略有不同。
使其工作的步骤如下
选择该项目后,您将看到它列为 jPopupMenu1 的子节点。
要更改菜单项的顺序,请选择一个项目,右键单击并选择上移或下移。
不要忘记,虽然您已将弹出菜单添加到表单中,但您仍然需要将弹出菜单注册到您希望为其激活的组件,最简单的方法是通过 SetComponentPopupMenu()。
I think you're talking about using the matisse visual designer in NetBeans.
In which case the process is slightly different from creating menubar menus that you can just drag onto the screen.
The steps to get this to work are as follows
After you have selected the item you will see it listed as a child node of jPopupMenu1.
To change the order of your menu items, select an item, right click and select move up or move down.
Don't forget that although you've added the pop-up menu to the form you still need to register the pop-up menu with the component that you want it to activate for, the easiest way to do so is via SetComponentPopupMenu().