?
Solved

Display a created HTML file

Posted on 1998-07-22
11
Medium Priority
?
247 Views
Last Modified: 2011-09-20
I want to display a HTML file that is generated on fly by my applet. ie
like an offscreen image I want to display a html file in the browser's frame on my multi frame html page.
Please help me.
regards
agvkumar
0
Comment
Question by:agvkumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 6

Expert Comment

by:gadio
ID: 1227596
There are several products that display html. There is a swing component that does that, and there is a compleate browser component in java that you can use from sun. Go to their site and download the evaluation version.
0
 
LVL 6

Expert Comment

by:gadio
ID: 1227597
You can download the browser from sun at:
http://www.javasoft.com/products/hotjava/bean/index.html

0
 
LVL 6

Expert Comment

by:gadio
ID: 1227598
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:agvkumar
ID: 1227599
hi,
  all the above answers are for applcations or simple html. I have a VRML code in my page
that is generated. I want to use the browser's VRML capapbilities. Hence These third party tools (though great are of no use and I do not want to develop any VRML rendering stuff) are of no use. Please help me regarding this


0
 
LVL 6

Expert Comment

by:gadio
ID: 1227600
How about www.tgs.com ?
0
 

Author Comment

by:agvkumar
ID: 1227601
it is a very expensive method I want to use the browsers plugin

0
 
LVL 6

Expert Comment

by:gadio
ID: 1227602
It seems that my answer is not good for you. You can reject it. You might want to edit your question and specify about the VRML.
Good luck,
G.
0
 
LVL 4

Expert Comment

by:evijay
ID: 1227603
use live connect and javascript

in java, invoke a javascript method which inturn writes the data on to the desired frame

This seems to be the only plausible method for displaying a dynamically generated html page onto a frame in browser since javascript has full control over the browser.

see developer.netscape.com for more info on connecting java and javascript.

0
 
LVL 4

Expert Comment

by:evijay
ID: 1227604
if you want source, i can give it tomorrow


vijay

0
 

Author Comment

by:agvkumar
ID: 1227605
dear Vijay,

 This is what I was looking for please help me.
  Please help me with the source and please point me to an URL where I can get the
javascript packages and help to be used in java.

Thanking you
venkatesh

0
 

Accepted Solution

by:
krishnakumar earned 1200 total points
ID: 1227606
Hi Venkatesh,
Try the following code. The design is to give the HTML content to javascript. Then Javascript will write the content to a newly opened window. Tell me if you need more details.

-Krishnakumar

JAVA CODE:
---------
public class jtest extends Applet
{
      boolean m_bReady = false;
      String m_str = null;
      public boolean IsDocReady()
      {
            boolean bReady = m_bReady;
            m_bReady = false;
            return bReady;
      }
      public String GetData()
      {
            return m_str;
      }
      public boolean mouseDown(Event evt, int x, int y)
      {
            m_str=new String("<html>\n<head>\n<title>jtest</title>\n</head>\n<body>\n<hr>\n<hr>\n<a href=\"jtest.java\">The source.</a>\n</body>\n</html>\n");
            m_bReady = true;
            return true;
      }
}
---------------

HTML source (with javascript):
<html>
<script language=javascript>
<!--
function Timer()
{
  if(self.document.myapplet != null)
  {
    if(self.document.myapplet.IsDocReady() == true)
    {
      var str = self.document.myapplet.GetData();
      if(str != null)
      {
        var NewWindow = window.open('',"NewWindow", "toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes");
        NewWindow.document.write(str);
      }
    }
  }
  setTimeout("Timer();",2000);
}

setTimeout("Timer();",2000);
//-->
</script>
<body>
<applet
    code=jtest.class
      name="myapplet"
    id=jtest
    width=320
    height=240 >
</applet>
</body>
</html>

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 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