The Artima Developer Community
Sponsored Link

Java Answers Forum
Can Java Frame contain a window of web browser?

7 replies on 1 page. Most recent reply: Aug 14, 2003 12:57 AM by David

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 7 replies on 1 page
Sonny

Posts: 9
Nickname: proban
Registered: Dec, 2002

Can Java Frame contain a window of web browser? Posted: Dec 7, 2002 3:22 AM
Reply to this message Reply
Advertisement
I try to create a java Frame with a Open Menu, that when I open a HTML file, it will display this .html file the same way as the browser does. Or simply the browser window just fits inside my frame. An example is like VisualCafe display a javadoc .html file inside its frame.
Please give me a hint. Thank you very very much for your help.
Best Regards,

Sonny


Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: Can Java Frame contain a window of web browser? Posted: Dec 7, 2002 8:37 AM
Reply to this message Reply
Sonny,
Spend a bit of time looking at the forum.
I posted 6 month ago some example where there was HTML code being rendered (HTML 3,2 without Javascript, Jscript, VBscript or whateverscript).

Here it is :
http://www.artima.com/forums/flat.jsp?forum=1&thread=649

Please not that the log4j API's have sligtly changed, you won't be able to use them straight off
 Category.getInstance (SomeNodeInHierarchy)
Must be changed into
 Logger.getLogger (SomeNodeInHierarchy) 
Rgds,

Thomas,

Sonny

Posts: 9
Nickname: proban
Registered: Dec, 2002

Re: Can Java Frame contain a window of web browser? Posted: Dec 9, 2002 3:48 PM
Reply to this message Reply
Thomas,
Thank you very much for your great help. I saw the HTML rendering in the frame, which I couldn't do before. However, the link in these HTML rendering is dead and the background color can be rendered. I'm trying to find out some other ways to work around with it. I'm thinking about the JFC together with Win32, but not sure I can do it. Will update later. Thanks a lot Thomas.
Best Regards,

Sonny

Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: Can Java Frame contain a window of web browser? Posted: Dec 10, 2002 10:27 AM
Reply to this message Reply
Link are not dead, you have to create your own listener for them. That is another story... but if you spend some time on the forum here, I made a post similar to that at about the same time (seen from now, at least ;-) ).



Thomas,

Puneet Aneja

Posts: 2
Nickname: puneet
Registered: Aug, 2003

Re: Can Java Frame contain a window of web browser? Posted: Aug 12, 2003 4:59 AM
Reply to this message Reply
I followed your posting.
But i am getting
"java.net.ConnectException: Operation timed out: connect" when i am trying to open a url.
Can you please help me out.

Thanks
Puneet

David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: Can Java Frame contain a window of web browser? Posted: Aug 12, 2003 6:14 AM
Reply to this message Reply
Check out JEditorPane.

Puneet Aneja

Posts: 2
Nickname: puneet
Registered: Aug, 2003

Re: Can Java Frame contain a window of web browser? Posted: Aug 13, 2003 4:03 AM
Reply to this message Reply
I did that with JEditorPane.
This is the code i wrote.

JEditorPane html;
try
{
URL url = new URL( "http://www.yahoo.com");
html = new JEditorPane( url );
html.setEditable( false );
JScrollPane scrollPane = new JScrollPane();
scrollPane.getViewport().add( html, BorderLayout.CENTER );
topPanel.add( scrollPane, BorderLayout.CENTER );
html.addHyperlinkListener( this );
}

But the Exception is coming.

Puneet

David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: Can Java Frame contain a window of web browser? Posted: Aug 14, 2003 12:57 AM
Reply to this message Reply
Please post the exception and its stacktrace!

Flat View: This topic has 7 replies on 1 page
Topic: Persistence in Swing App Previous Topic   Next Topic Topic: Client/Server writing to database

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use