Solved

Calling new HTML page from an applet

Posted on 2002-04-16
2
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

717 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