Solved

change location of browser

Posted on 1998-02-21
1
194 Views
Last Modified: 2010-04-16
How can i change the location of the browser
in java?
Example:change the position to "www.yahoo.com"
0
Comment
Question by:tomerlei
1 Comment
 
LVL 2

Accepted Solution

by:
anguslai earned 10 total points
ID: 1233177
Use the following method to open a new page in browser:
  try {
   getAppletContext().showDocument(new URL("www.yahoo.com), "_self");
  }
  catch(MalformedURLException e) {}

The "_self" inside showDocument() just asking it to open www.yahoo.com in the current frame/browser. If you always want the new page to use whole browser area (not inside a frame), then you can omitt the "_self" argument.
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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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:

895 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

15 Experts available now in Live!

Get 1:1 Help Now