Re: Netbeans Visual API help

geertjan wielenga <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>

     private class SceneCreateAction extends WidgetAction.Adapter {
         @Override
         public WidgetAction.State mousePressed(Widget widget,
         WidgetAction.WidgetMouseEvent event) {
             if (event.getClickCount() == 1) {
                 if (event.getButton() == MouseEvent.BUTTON1 || 
event.getButton() == MouseEvent.BUTTON2) {
                      // do something
                 }
             }
             return WidgetAction.State.REJECTED;
         }
     }

Example: https://blogs.oracle.com/geertjan/entry/how_to_draw_lines_on

Gj

On 19-7-2016 1:45, EddHard wrote:
> I use netbeans visual library for make graph with some widget.. I want to left click on the widget to take action, for example open new frame or something.. But I cant find code for do it.. I just find code for right click using popUpMenuAction.. Anyone can help me please?
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.