Cybertronic
Technical User
- May 18, 2006
- 19
Hi all,
I'm having a problem with my Java web browser program that I'm working on. At the moment I'm stuck on trying to get my web browser to load the home page after it has been executed. Below is my current code for the actionPerformed method:
If I try to change address to a string containing a URL e.g " it doesn't load the website after it has been executed
Can anybody please help me?
I appreciate anyone's assistance,
Thanks,
Jonathan
I'm having a problem with my Java web browser program that I'm working on. At the moment I'm stuck on trying to get my web browser to load the home page after it has been executed. Below is my current code for the actionPerformed method:
Code:
public void actionPerformed (ActionEvent ae)
{
String address = addressTextField.getText();
try
{
contentPane.setPage(address);
addressTextField.setText(address);
}
catch(IOException ioe)
{
JOptionPane.showMessageDialog(null, "Warning " + address, "Java Web Browser", JOptionPane.ERROR_MESSAGE);
}
}
Can anybody please help me?
I appreciate anyone's assistance,
Thanks,
Jonathan