Solved

Calling new HTML page from an applet

Posted on 2002-04-16
2
209 Views
Last Modified: 2010-03-30
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
Comment
Question by:afsac
2 Comments
 

Accepted Solution

by:
mrowka earned 100 total points
Comment Utility
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
 

Author Comment

by:afsac
Comment Utility
Worked like a charm!  Thank you ever so much!!!!!!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now