User    Pass    













Key Benefits




Standards Supported




Download Now


API Documentation


Developers Guide


Code Examples


Updated Builds


Technical Articles






Jump to:

General WebRenderer Functions

  WebRenderer example code base.


Advanced WebRenderer functions


Application test examples


Deploying WebRenderer

WebRenderer DOM




Blocking Popup windows with WebRenderer




Blocking Popup windows

Popup windows are managed through the IBrowserCanvas WindowListener. Through utilizing the WindowListener popup windows can be created, destroyed, customized etc based upon parameters such as the popup windows URL.

browser.addWindowListener( new com.webrenderer.event.WindowAdapter() {
        public void onNewWindow( com.webrenderer.event.WindowEvent e ) {

                // Block any Popups from myurl.com
                if(!e.getURL().equals("www.myurl.com")) {
                        // Create a parent JFrame for the popup
                        final JFrame popup = new JFrame( "Popup" );
                        // The browser that the popup content will display within
                        IBrowserCanvas browserPopup = e.getPopupBrowser();

                        // Adding a resize listener to the popup window
                        browserPopup.addWindowListener( new com.webrenderer.event.WindowAdapter()
                                public void onWindowResize ( com.webrenderer.event.WindowEvent e ) {
                                        popup.setSize( e.getWidth(), e.getHeight() );
                        popup.getContentPane().add( BorderLayout.CENTER, browserPopup.getCanvas() );
                        // Destroy the JFrame when the popup window is closed
                        popup.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE ); popup.setVisible( true );



Millions of deployments and counting.. Users of JadeLiquid's tools can be found in every corner of the Earth




 > Enabling Flash in WebRenderer - Article
 > Browser Zoom Effect using WebRenderer - Article
 > Applet deployment techniques - Article
 > WebRenderer core features on display! - Article
   Additional News  
 > Enabling HTML 5 WebSockets in WebRenderer - Blog
 > 64bit WebRenderer deployment with Web Start - Blog
 > Deploying WebRenderer Server Edition in Tomcat - Blog
 > WebRenderer 6 adds performance text search - Blog


 Java and the Java Logo are trademarks or registered trademarks of Oracle Corporation in the United States and other countries 

Privacy Policy  |   Disclaimer