Hello, I am new to java coding and i am 13 i have been trying to make a simple web browser and i have finished my code but it doesn't seem to be working can you correct it please,
package com.LewisBelton.BellyBrowser;
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
public class Browser extends JFrame
{
JTextField url;
JEditorPane page;
public Browser()
{
super("BellyBrowser");
url = new JTextField("Enter URL Here.");
url.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
loadPage(event.getActionComand());
}
}
);
page = new JEditorPane();
page.setEditable(false);
page.addHyperLinkListener(
new HyperLinkListener()
{
public void hyperlinkupdate(HyperlinkEvent event)
{
if(event.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
{
loadPage(event.getURL().toString);
}
}
}
);
add(url, BorderLayout.NORTH);
add(new JScrollPane(page), BorderLayout.CENTER);
setSize(1000, 700);
setResizable(true);
setVisible(true);
}
private void loadpage(String pageURL)
{
try
{
page.setPage(pageURL);
url.setText(pageURL);
}
catch(Exception e)
{
System.out.println("Website Not Found");
}
}
}