I am trying to create a help panel for the application I'm working on. A help file that has already been created using html technology, and I would like it to appear in the panel and show. All the code I saw shows how to display a site, for example. " http://google.com ". I want to display a file from my computer, for example. "File: // C: \ tutorial.html"
This is the code that I have, but it does not work.
import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; import java.awt.Color; import java.awt.Container; import java.io.IOException; import static java.lang.System.err; import static java.lang.System.out; final class TestHTMLRendering {
source share