home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-06-23 | 1.3 KB | 46 lines |
- import java.applet.*;
- import java.awt.*;
-
- /**
- * An applet that demonstrates HREFButton.
- * Requires HREFButton.class
- *
- * @author L. Todd Lowe, ltlowe@achilles.net
- * Last change: LTL 22 Jun 96 10:21 pm
- */
- public class HREFButtonApplet extends Applet
- {
- HREFButton b;
-
- /**
- * Initialise the applet. Get the parameters and pass
- * them to HREFButton().
- *
- * @param href The URL to be loaded when the button is pressed. (From <Applet> tag.)
- * @param frame The frame in which to display the URL (optional). (From <Applet> tag.)
- * @param label The label of the button. (From <Applet> tag.)
- */
- public void init()
- {
- setLayout( new GridLayout(1,1) );
- b = new HREFButton( this,
- getParameter("href"),
- getParameter("frame"),
- getParameter("label") );
- add(b);
- }
-
- /**
- * mouseEnter() is needed at the Applet level to
- * prevent Netscape from displaying "Applet is running"
- * every time the mouse moves over the applet.
- * Without this patch/kludge the status updates of the
- * HREFButton are often overwritten and obscured!
- */
- public boolean mouseEnter(Event e, int x, int y )
- {
- return true;
- }
- }
-
-