Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

change location of browser

Posted on 1998-02-21
1
Medium Priority
?
234 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 40 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

971 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