Sample usage from a Java application

 

BrowserHawk's powerful capabilities are available for native use with Java applications. All that is required is Java 2 or higher.

 

This example demonstrates how to use the BrowserHawk4J JavaBean from a stand-alone Java™ application:

 

Using the BrowserHawk4J JavaBean from a stand-alone Java™ application:

 

import com.cyscape.browserhawk.*;

BrowserInfo bi =

BrowserHawk.getBrowserInfo("user agent passed here");

if (! b.getFrames() )

System.out.println("frames not supported");

Else

System.out.println("frames supported!");