Hello,

I have a signed applet. a web page (asks for permissions and) loads and the applet and performs some information processing and writes data to a text file.
Then the web page refreshes a few components and gives the applet a different CSS class (to move it to other position on the page) and the applet reloads, reads data from file and must load it as html into JTextPane.

The problem: when the applet reloads it is given a parameter from html code. This way it knows the now it must display the information to the JTextPane as a list of links in html format. But the JTextPane displays nothing.
I tried to load the html as a simple text and it worked. I also tried to run the applet with the parameter to display data from the very start (when webpage asks for permission to run the applet) and it worked.

So in short I the problem is that when the applet initializes and loads data from the start everything is fine but if it first performs inf. processing and then reloads it cant display html in JTextPane.


I am using javax.swing.JApplet; for applet.
This is the initialization of the applet. It starts the applet as a thread.

Java Code:
public void init() {
          try {
               jbInit();
new Thread(this, "processFunctionThread").start();
jbInit() builds/adds visulal components on the applet.

Java Code:
displayEditorPane = new JEditorPane();
            displayEditorPane.setContentType("text/html");
            displayEditorPane.setEditable(true);
            displayEditorPane.addHyperlinkListener(this);
            displayEditorPane.setBounds(new Rectangle(10, 10, 260, 365));
            displayEditorPane.setContentType("text/html");
          dataScrolling = new JScrollPane(displayEditorPane);
          dataScrolling.setBounds(new Rectangle(10, 10, 260, 365));
          dataScrolling.setVisible(true);
public void run() has the main function that (depending on the passed from html parameter) performs actions.

Java Code:
if ( getParameter("scan").equals("doscan") ) {
// performs initial information processing 
} else if(getParameter("scan").equals("scanresults")) {
// after the web page gives the applet a different css class it reloads and displays data to JTextPane.
}

It's the same either with JEditorPane or with JTextPane.

Please, help me! Thanks