• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Calling new HTML page from an applet

All,
     I have the following code:
class Bookmark{
   String name;
   URL url;
   Bookmark(String name, String theURL){
      this.name = name;
      try { this.url = new URL(theURL);}
     
            System.out.println("Bad URL: " + theURL);
      }
   }
}
This code will bring up a new url on a given condition.  This works great! Sort of....
This will bring up the url in my current browser, I want it to bring up the url in a
seperate browser.  Can anybody tell me how to do this?

Thanx!
0
afsac
Asked:
afsac
1 Solution
 
mrowkaCommented:
try using the target parameter "_blank" of
the showDocument method in the applet context:

AppletContext myContect = getAppletContext();
myContect.showDocument(url, "_blank" );

for more info see:

http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
0
 
afsacAuthor Commented:
Worked like a charm!  Thank you ever so much!!!!!!!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now