Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

change location of browser

How can i change the location of the browser
in java?
Example:change the position to "www.yahoo.com"
0
tomerlei
Asked:
tomerlei
1 Solution
 
anguslaiCommented:
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's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now