dear rose indians I am working on a swing application (Content Management System). In which i have to show HMTL pages in swing window forms to display html contents i am using JEditorPane control.
Html contents is being is feteched from a local disc but links in the file are not working and some arrangement is being disturbed of html files in JEditorPane. I am using the following code can you suggest me the other way thanks in advance
File htmlFile = new File("path of the html file "); htmlPane = new JEditorPane(); htmlPane.setContentType("text/html"); htmlPane.setPage(htmlFile.toURI().toURL()); htmlPane.addHyperlinkListener(this); JScrollPane jsp= new JScrollPane(htmlPane); cp.add(jsp); jsp.setBounds(750, 50, 600, 600);
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.