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]

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);
}
}