FileDocCategorySizeDatePackage
Browser.javaAPI DocExample2404Sat Nov 25 11:54:26 GMT 2000None

Browser

public class Browser extends JFrame

Fields Summary
static JTextField
textField
static JEditorPane
editor
Constructors Summary
public Browser(String s)

        super(s);

        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        editor = new JEditorPane();
        textField  = new JTextField();
        JScrollPane scrollPane = new JScrollPane(editor);

        editor.setEditable(false);

        panel.add(new JLabel("Location:  "), BorderLayout.WEST);
        panel.add(textField, BorderLayout.CENTER);

        getContentPane().add(panel, BorderLayout.NORTH);
        getContentPane().add(scrollPane, BorderLayout.CENTER);

        editor.addHyperlinkListener(new HyperListener());
        textField.addActionListener(new TextFieldListener());
    
Methods Summary
public static voidmain(java.lang.String[] args)

        Browser frame = new Browser("Browser");
        frame.setSize(400,400);
        frame.setVisible(true);