1
 public static JComponent createContent() {   
    JPanel contentPane = new JPanel(new BorderLayout());   
    JPanel webBrowserPanel = new JPanel(new BorderLayout());   
    webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));   
    final JWebBrowser webBrowser = new JWebBrowser();   
    webBrowser.navigate("http://www.google.com");   
    webBrowserPanel.add(webBrowser, BorderLayout.CENTER);   
    contentPane.add(webBrowserPanel, BorderLayout.CENTER);   
    // Create an additional bar allowing to show/hide the menu bar of the web browser.   
    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 4, 4));   
    JCheckBox menuBarCheckBox = new JCheckBox("Menu Bar", webBrowser.isMenuBarVisible());   
    menuBarCheckBox.addItemListener(new ItemListener() {   
      public void itemStateChanged(ItemEvent e) {   
        webBrowser.setMenuBarVisible(e.getStateChange() == ItemEvent.SELECTED);   
      }   
    });   
    webBrowser.addWebBrowserListener(new WebBrowserListener() {
}

// I am using DJ Native Web Browser. I want to manipulate link using this. Can i achieve this thing using this dj native web browser. For eg: even on clicking any link i want it to open google.com only.

Cœur
  • 37,241
  • 25
  • 195
  • 267
rahul bilove
  • 75
  • 1
  • 1
  • 8

1 Answers1

0

You can manipulate links in the DOM via Javascript executed by JWebBrowser.

RudeUrm
  • 46
  • 2