Solved

Calling new HTML page from an applet

Posted on 2002-04-16
2
212 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
ID: 6945370
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
ID: 6945507
Worked like a charm!  Thank you ever so much!!!!!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

910 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

21 Experts available now in Live!

Get 1:1 Help Now