Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Opening a html file in another window using an applet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have got a 3 frame window. one occupies the horizontal top most part of the screen. (16%). and another two vertical.
one of the vertical frame has got a tree. the third frame shows the html file when clicked on the nodes of the tree.
I want to write an applet having buttons "Show Tree" & "Hide Tree"
when pressed on the "hide tree", the tree shoul disappear and the third frame should occupy the whole of the bottom most portion
and vice versa.
expecting a suitable reply
arun

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL url;
String link="http://www.yoursite.com/yourfile.html";
try {
url= new URL (link);
}
catch (MalformedURLException e) {}
......
......
String window;
/* "window" can be initialized as "_blank", "_top","_left,"_right", "_bottom" or simply the name of the necessary frame window*/
......

getAppletContext().showDocument(url,window); /* open url in necessary window*/


 
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aruniyer,
Please be sure to register with a proper name. If you do not, your account will be disabled. See the following link for details:
http://www.javaranch.com/name.html
Thanks.
Stephanie
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic