home *** CD-ROM | disk | FTP | other *** search
Java Source | 1999-08-09 | 650 b | 30 lines |
- import javax.swing.*;
- import javax.swing.border.*;
- import javax.swing.event.*;
- import javax.swing.text.*;
- import javax.accessibility.*;
-
- import java.awt.*;
- import java.net.URL;
- import java.net.MalformedURLException;
- import java.io.IOException;
-
- /** A simple extension to HtmlPanel that
- allows linked pages to open in a different frame.
- */
- public class IndexPanel extends HtmlPanel
- {
- protected HtmlPanel activePane;
-
- public IndexPanel(String homePage, HtmlPanel panel)
- {
- super(homePage);
- setBorder(emptyBorder5);
- activePane = panel;
- }
-
- protected void linkActivated(URL u) {
- activePane.navigate(u);
- }
-
- }