To handle pop-up windows in your JavaFX application you have two options:


1. Register default JavaFX pop-up handler implementation: 

browser.setPopupHandler(new com.teamdev.jxbrowser.chromium.javafx.DefaultPopupHandler());

2. Register your own implementation where you decide how exactly you would like to display a new pop-up window: 

browser.setPopupHandler(new PopupHandler() {
    public PopupContainer handlePopup(PopupParams params) {
        return new PopupContainer() {
            public void insertBrowser(final Browser browser, final Rectangle initialBounds) {
                Platform.runLater(new Runnable() {
                    @Override
                    public void run() {
                        final Stage stage = new Stage();
                        StackPane root = new StackPane();
                        Scene scene = new Scene(root, 800, 600);
                        BrowserView browserView = new BrowserView(browser);
                        root.getChildren().add(browserView);
                        stage.setScene(scene);
                        stage.setTitle("Popup");
                        if (!initialBounds.isEmpty()) {
                            stage.setX(initialBounds.getLocation().getX());
                            stage.setY(initialBounds.getLocation().getY());
                            stage.setWidth(initialBounds.width);
                            stage.setHeight(initialBounds.height);
                        }

                        stage.setOnCloseRequest(new EventHandler<javafx.stage.WindowEvent>() {
                            public void handle(javafx.stage.WindowEvent event) {
                                browser.dispose();
                            }
                        });

                        browser.addDisposeListener(new DisposeListener<Browser>() {
                            public void onDisposed(DisposeEvent<Browser> event) {
                                Platform.runLater(new Runnable() {
                                    public void run() {
                                        stage.close();
                                    }
                                });
                            }
                        });
                        stage.show();
                    }
                });
            }
        };
    }
});