popup window which reads in .html file

Hi, I am now working on JavaHelpSet. While I am asked not to bring the whole helpset in but only one topic at a time using popup window when context sensitive help button is clicked.

I can only display txt file in the popup window now, does anyone know how to display html file in the popup window?

Thanks a lot!

[340 byte] By [fainty] at [2007-9-26 16:22:49]
# 1
What kind of application is it? Web? Applet? Standalone?
JayaseelanL at 2007-7-2 19:55:34 > top of Java-index,Archived Forums,Java Programming...
# 2

I have some old code of mine ... may help you

import javax.swing.JPanel;

import javax.swing.JScrollPane;

import javax.swing.JTextPane;

import java.awt.BorderLayout;

import java.awt.Dimension;

import java.awt.Toolkit;

public class StatusPanel extends JPanel{

private static JTextPane m_JTextPane = new JTextPane();

final static Toolkit m_Toolkit = Toolkit.getDefaultToolkit();

public StatusPanel(){

super();

setPreferredSize(new Dimension(

(int)m_Toolkit.getScreenSize().getWidth()-10,

(int)m_Toolkit.getScreenSize().getHeight()/6));

m_JTextPane.setPreferredSize(new Dimension(

(int)m_Toolkit.getScreenSize().getWidth()-10,

(int)m_Toolkit.getScreenSize().getHeight()/8));

final JScrollPane l_ScrollPane = new JScrollPane(m_JTextPane);

m_JTextPane.setContentType("text/html");

setContent("<b><i><font color='blue' >Welcome to Test Suite..............</font></i></b>");

add(l_ScrollPane, BorderLayout.CENTER);

}

public static void setContent(String p_Content){

m_JTextPane.setText(p_Content);

}

}

nitin_matrix at 2007-7-2 19:55:34 > top of Java-index,Archived Forums,Java Programming...
# 3
The Java Swing Tutorial has a section on loading an HTML file into a JEditorPane: http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html#editorpaneThe tutorial can be downloaded free from: http://java.sun.com/docs/books/tutorial/
camickr at 2007-7-2 19:55:34 > top of Java-index,Archived Forums,Java Programming...