Package chrriis.dj.nativeswing.swtimpl

Examples of chrriis.dj.nativeswing.swtimpl.NativeComponent.addMouseListener()


    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
    final JWebBrowser webBrowser = new JWebBrowser();
    NativeComponent nativeComponent = webBrowser.getNativeComponent();
    // Add the popup menu
    webBrowser.setDefaultPopupMenuRegistered(false);
    nativeComponent.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        maybeShowPopup(e);
      }
      @Override
View Full Code Here


    // Create an area that shows the various input events the web browser can send.
    JPanel southPanel = new JPanel(new BorderLayout());
    southPanel.setBorder(BorderFactory.createTitledBorder("Key and mouse events from the web browser"));
    final JTextArea textArea = new JTextArea();
    textArea.setEditable(false);
    nativeComponent.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        textArea.append(e.toString() + "\n");
      }
      @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.