Solved

change location of browser

Posted on 1998-02-21
1
182 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

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

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
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 will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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.

707 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