问题
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 - Yes, I tried googling and found only this, but it is not helping...
回答1:
Okay, I figured it out by myself.
- Open
Windows -> Navigation -> Navigator
it will show a navigator window with all components currently on jFrame. - In that navigator window then click
Other components
. - In there all non visual components including
jPopopMenu
will be listed. - By clicking on any of these components it is possible to edit their properties.
- Editing the popup menu visually is possible by
double clicking
on it. It will then bring up visual menu builder.
来源:https://stackoverflow.com/questions/20004179/netbeans-add-popup-menu-with-visual-editor