Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IE within Swing Application  RSS feed

 
Mohan Panigrahi
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mohan Panigrahi
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahahahha... Nathan, smartass
 
Mohan Panigrahi
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!