home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-01 | 1.1 KB | 41 lines |
- // ICE Browser - simple demo example for version 4.0
-
- import ice.htmlbrowser.Browser;
-
- import java.awt.*;
- import java.awt.event.*;
-
-
- public class demo1 extends Frame
- implements WindowListener
- {
- public static void main(String args[]) {
- demo1 d = new demo1("http://www.icesoft.no/");
- d.setSize(500,300);
- d.show();
- }
-
-
- public demo1(String loc) {
- addWindowListener( this );
- setLayout(new BorderLayout());
- // Start up the browser
- iceBrowser = new Browser();
- add("Center",iceBrowser);
- iceBrowser.gotoLocation(loc);
- }
-
- // WindowListener interface
- public void windowClosing( WindowEvent event ) { dispose(); }
- public void windowOpened( WindowEvent event ) {}
- public void windowIconified( WindowEvent event ) {}
- public void windowDeiconified( WindowEvent event ) {}
- public void windowClosed( WindowEvent event ) { System.exit(0);}
- public void windowActivated( WindowEvent event ) {}
- public void windowDeactivated( WindowEvent event ) {}
-
-
- protected ice.htmlbrowser.Browser iceBrowser;
- }
-
-