I have an applet I've built using NetBeans, called AKApplet. It runs fine in the IDE, but when I put it in a web page it throws the following error:
Exception in thread "Thread-15" java.lang.NoClassDefFoundError: AKApplet$2
at AKApplet.run(AKApplet.java:675)
The applet uses the run() method to load some data in the background while keeping the UI responsive. Pretty standard stuff. At line 675, after the data has been loaded, I'm trying to update the UI components using invokeLater()
:
public void run() {
// ... data loads ...
// line 675:
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
userMessages.setText("Data loaded.");
panelList.setVisible(true);
validate();
}
});
}
The components I'm trying to update are userMessages
, a JLabel and panelList
which is a Panel. I don't think it's getting that far however.
Does anyone know what might be happening? At this point the applet has loaded and the components can be seen and have been updated, etc.