JBrowser Sample Code

View our Product Catalog

JBrowser Demo

The JBrowser Component comes with a sample application. Use the sample application to get yourself up to-speed quickly and/or javadoc for custom solutions.

  • View sample Java code (com.markelsoft.JBrowserApp.java)
  • Use runsample.bat to run the sample application
  • Sample code snippet:
  • import com.markelsoft.jbrowser.*;

     // create a browser with toolbar, address, and status areas
    JBrowser browser = new JBrowser(“http://www.ebay.com”);
    add(browser, BorderLayout.CENTER);

    // get the html for the page
    String html = browser.getHtml();

    // get the value for the form “mainForm” element “name”
    String value = browser.getHtmlFormItem(“mainForm”, “name”);

 

 

 

 

 

      

 

  • To compile an application include the following jars in the classpath:
      • jbrowser.jar
      • BrowserTools.jar
      • jawin.jar
  • To run an application include the following jars in the classpath:
      • jbrowser.jar
      • BrowserTools.jar
      • jawin.jar
      • see runsample.bat for an example
  • AND jawin.dll in the application directory or system library path

Sample Java application using JBrowser component:   
[other examples of JBrowser: Speed Bid for eBay and FlashgameZ]

 

[MarkelSoft Home] [Buy or Try Products] [Product Tours] [Product Snapshots] [Product Support] [Services] [News] [Open Source] [Markel Radio] [About Us] [Contact Us] [Site Search]