This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes IE within Swing Application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "IE within Swing Application" Watch "IE within Swing Application" New topic
Author

IE within Swing Application

Mohan Panigrahi
Ranch Hand

Joined: Sep 28, 2001
Posts: 142
Hi,
Background:
I need to include an HTML pane inside my swing application that shall load different static html pages based on the button clicked.
Problem :
I read that as of now, Java supports only HTML 3.2 in its JTextPane and HTMLEditorKit.
Question:
Could any one suggest how to display html 4.0 page inside the swing application, possibly by launching the installed IE within a swing panel.
Thanks!
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
I do not think you can run an explorer within a swing panel.
You can initiate an explorer via Runtime.exec() method.
Search the intermediate forum for examples.


SCJP2. Please Indent your code using UBB Code
Mohan Panigrahi
Ranch Hand

Joined: Sep 28, 2001
Posts: 142
My requirement is not simply to create a seperate process instance, which Runtime.exec() does. The requirement is to constrain IE window in a panel of my swing application.
I am sure there would be some way to do this!
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Your "requirement" suddenly changed from just rendering HTML 4.0 to embedding IE inside a Swing component?!?!?

:roll:

You can take a look at this page that provides code and a description of how HTMLEditorKit works and may give you some direction on how you may be able to modify it to support HTML 4.0.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Ahahahha... Nathan, smartass
Mohan Panigrahi
Ranch Hand

Joined: Sep 28, 2001
Posts: 142
Thanks Bartender!
Your "requirement" suddenly changed from just rendering HTML 4.0 to embedding IE inside a Swing component?!?!?

Well if HTMLEditorKit did not support html 4.0 then I would rather have liked IE to be embedded in swing panel.[ Reading in perspective helps! ]
I found out that infact there is already an RFE ( request for enhancment) submitted for this at java.sun.com
Bug Id 4880230
Thanks anyway!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IE within Swing Application
 
Similar Threads
Javascript inside SWING
Problem in Opening HTML Page in Internet Explorer from my Swing Application
Mouse Wheel Support in Swing Application
servlet validation?
interfacing with internet explorer