}
private static WebBrowserDecorator createCustomWebBrowserDecorator(JWebBrowser webBrowser, Component renderingComponent) {
// Let's extend the default decorator.
// We could rewrite our own decorator, but this is far more complex and we generally do not need this.
return new DefaultWebBrowserDecorator(webBrowser, renderingComponent) {
@Override
protected void addMenuBarComponents(WebBrowserMenuBar menuBar) {
// We let the default menus to be added and then we add ours.
super.addMenuBarComponents(menuBar);
JMenu myMenu = new JMenu("[[My Custom Menu]]");