Hi,
On Wed, Oct 28, 2009 at 9:33 PM, Jirka_Kutil <
jiri.svatos@...> wrote:
> Hello,
>
> Please, can someone help me with popup menu in Netbenas module? I try create it. I searched some tutorial of creating popup menu in module, but I did not search. Do you know about something, some url, etc.?
>
> I want to create popup menu i my module for example in topComponent, but i do know how, I tried for example
>
> public class MyPopupOnLabel extends JLabel implements Presenter.popup
>
> a use public JMenuItem getPopupPresenter() {
>
> JMenu jm = new JMenu("dd");
>
> jm.add(new JmenuItem("ss"));
>
>
>
> return jm;
>
> }
>
>
>
> and this MyPopupOnLabel give to JPanel in TopComponent.
>
>
>
> but no result :(
>
> Should I make some changes in layer.xml?
>
Depending on the need, you can easily create Popup menu using standard
Swing JPopupMenu. Then after creating popup menu, you need to display
it (eg: On Window/Unix/Linux is usually using right click)
Cheers
Tonny Kohar
--
Sketsa SVG Editor
imagine, design, create ...
http://www.kiyut.com