[ Back | Previous | Next ]

How to load a document from an applet?

Package:
java.applet.*
Product:
JDK
Release:
1.0.2
Related Links:
General
General
General
Comment:
/**
        * called when user clicks in the applet
        * force the browser to show the associated URL
        * @param evt - event record
        * @param x, y - x and y coordinate of the mouse click
        */
       public boolean mouseDown (Event evt, int x, int y) {

               if (url[current] != null)

                       getAppletContext().showDocument (url[current]);
               return true;
       }
       }