Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening a html file in another window using an applet

 
aruniyer
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

 
Tatiana_Konstantinova
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*/


 
Stephanie Grasson
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic