Hi,

My applet skeleton is as follows:

public class IIcompanies extends JApplet {

        public void init() {
         // New table model
         TableModel tModel = new AbstractTableModel() {
                // def
         };
         sorter = new TableSorter(tModel);  // A sorter model
         table = new JTable(sorter);        // The actual table
         sorter.addMouseListenerToHeaderInTable(table);
         // Some table prefs methods
         // A table.registerKeyboardAction method
         JScrollPane scrollPane = new JScrollPane(table);
         getContentPane().add(scrollPane,BorderLayout.CENTER);

         // code to load jdbc driver
         // and to connect to the database
        }

        public void start() {
         // Executing SQL query which sets a Vector accessed by the model
        }


        public void actionPerformed(ActionEvent ev) {
          // Go to another URL
        }

        public void stop() {
         // Close the ResultSet
        }

        public void destroy() {
          // close connection
          // Output the list of active threads in this ThreadGroup
        }
}

As specified in the Java swing tutorial, I have no GUI code in the start
method.


Under Netscape 4.61, an error happens when destroying this applet as shown
in Java Console:

# destroyApplet: contextID=3 appletID=151306304
# Destroying applet: com.mdr.Reuters.IIcompanies, appletID=151306304,
# contextID=3
#     total applets=0
#   destroying context for contextID 3
# Destroying applet context: http://192.168.1.226/live/genApplet.php3,
# contextID=3
#   frameMWContext=0
# Destroying all applets: http://192.168.1.226/live/genApplet.php3,
# contextID=3
AppletEventDispatcher:AppletEventDispatcher
AppletEventDispatcher:Thread-2
AppletEventDispatcher:TimerQueue
# Applet com.mdr.Reuters.IIcompanies destroyed
# Applet com.mdr.Reuters.IIcompanies disposed
# Applet com.mdr.Reuters.IIcompanies killed
# Applet com.mdr.Reuters.IIcompanies did not shut down within 30 seconds
# -- killing it.
# Exception while destroying group: com.mdr.Reuters.IIcompanies
java.lang.IllegalThreadStateException
  at java.lang.ThreadGroup.destroy(ThreadGroup.java:673)
* at 
netscape.applet.AppletThreadGroup.destroyItDamnIt(AppletThreadGroup.java:53)
  at netscape.applet.AppletThreadKiller.run(AppletThreadKiller.java:449)
  at java.lang.Thread.run(Thread.java:504)


It seems that Thread-2 or TimerQueue do not die even after IIcompanies is
destroyed, and then destroying the ThreadGroup throws an exception.

When I don't use Swing, such a problem does not happen.

Under Windows, this causes Netscape to hang.
While under Linux, it doesn't.


Any clues ?

PS: Is there a more specific mailing list or newsgroup for Swing?
For Netscape-java ?

Thanks in advance.

Hicham Mouline


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to