Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include HTML file in core java application

 
Prakhar Singhal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !!

Can somebody guide me by telling "how can I add HTML fiel in java application?"
I have created a simple application by using AWT and Swing components and I want to include a html file in it. When I start my application, I want to display this HTML file in a JPanel and then redirect to the main application.

How can help me to find the solution?
 
Robert Waals
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JEditorPane is capable of displaying HTML.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JEditorPane is very limited on what it can display (HTML 3.2, no CSS, no JavaScript, etc.). I'd look into something more powerful that is still actively developed, like the Lobo web browser component on SourceForge.
 
Prakhar Singhal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou so much for your responses.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic