• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Open html page in java

 
nandhini sruthi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need help for how to open html page in new window while click the button in java.please give the solution.

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "clicking a button in java" mean? Is this a desktop application? An applet? Something else?

Should the web page be displayed in a browser or in the Java GUI?
 
nandhini sruthi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I done some design in html page.In applet while click the button the html page should display in new window.That is in Either browser or Java GUI.

Thanks in advance.
 
Nathan Leniz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opening a new window in a browser is as simple as using some of the additional options in the <a href... block.

W3C tutorial
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's rather difficult to display a web page in a Java GUI, so let's stay with displaying it in the browser.

In the applet class you can call the "getAppletContext().showDocument(...)" method. If you pass it just a single parameter, the page will replace the current page (which contains the applet). If you want to display the page in a new window, you need to use the showDocument call that takes two parameters.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic