用户登录
用户注册

分享至

Netbeans 添加带有可视化编辑器的弹出菜单

  • 作者: 偷偷放个屁
  • 来源: 51数据库
  • 2023-01-29

问题描述

我需要将 popup menu 添加到 JFrame,但是当我将该组件放在那里时,它就会消失.我可以在代码中看到它,但没有办法编辑它的任何内容.有没有办法像说 menu bar 那样编辑它?如果这很重要,我会使用 Netbeans 7.2.1.

I need to add a popup menu to the JFrame, but when I drop that component there it just dissappears. I can see it in code, but there is no way to edit anything about it. Is there a way I can edit it like say menu bar? I use Netbeans 7.2.1 if that is important.

PS - 是的,我试过谷歌搜索,只发现 this,但它没有帮助......

PS - Yes, I tried googling and found only this, but it is not helping...

推荐答案

好吧,我自己想通了.

  1. 打开 Windows ->导航->Navigator 它将显示一个导航器窗口,其中包含当前在 jFrame 上的所有组件.
  2. 在该导航器窗口中,然后单击Other components.
  3. 其中将列出所有非可视组件,包括 jPopopMenu.
  4. 通过单击这些组件中的任何一个,可以编辑它们的属性.
  5. 可以通过双击直观地编辑弹出菜单.然后它会弹出可视菜单生成器.
  1. Open Windows -> Navigation -> Navigator it will show a navigator window with all components currently on jFrame.
  2. In that navigator window then click Other components.
  3. In there all non visual components including jPopopMenu will be listed.
  4. By clicking on any of these components it is possible to edit their properties.
  5. Editing the popup menu visually is possible by double clicking on it. It will then bring up visual menu builder.
软件
前端设计
程序设计
Java相关