Japplet

D

d.schulz81

HI there

currently we are trying to convert a java gui program into an applet.
now that we are inheriting from JApplet we have the following error
message:
(formerly the program inherited from JComponent)

Laden: Instanz von
freestyleLearningGroup.independent.util.FLGPlotter2D.class kann nicht
erstellt werden.
java.lang.InstantiationException:
freestyleLearningGroup.independent.util.FLGPlotter2D
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Means the instance could not be created....

Is there a problem running threads in Applets?
What else could cause the failure?

Dennis
 
K

klynn47

No there is no problem running threads in Applets.

This is from the API documentation of InstantiationException.

Thrown when an application tries to create an instance of a class using
the newInstance method in class Class, but the specified class object
cannot be instantiated because it is an interface or is an abstract
class.
 
Z

zero

(e-mail address removed) wrote in @g47g2000cwa.googlegroups.com:
HI there

currently we are trying to convert a java gui program into an applet.
now that we are inheriting from JApplet we have the following error
message:
(formerly the program inherited from JComponent)

Laden: Instanz von
freestyleLearningGroup.independent.util.FLGPlotter2D.class kann nicht
erstellt werden.
java.lang.InstantiationException:
freestyleLearningGroup.independent.util.FLGPlotter2D
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Means the instance could not be created....

Is there a problem running threads in Applets?
What else could cause the failure?

Dennis

try posting the code that generates this error
 
D

d.schulz81

this is the beginning, ich guess all of the code code is to huge to
post

public class FLGPlotter2D extends JApplet implements Runnable {

VARS...

public FLGPlotter2D(FLGFunctionGroup2D functionGroup,
FLGPolygonGroup2D polygonGroup, String xAxisName, String
yAxisName) {
setDataGroups(functionGroup, polygonGroup);
this.xAxisLabel = new JLabel(xAxisName);
this.xAxisLabel.setSize(this.xAxisLabel.getPreferredSize());
this.yAxisLabel = new JLabel(yAxisName);
this.yAxisLabel.setSize(this.yAxisLabel.getPreferredSize());
//setBorder(FLGBorderFactory.emptyLoweredBevel10);
}

/**
* Erzeugt einen 2D Plotter mit der spezifizierten Funktionsgruppe
und den
* Standard-Achsenbeschriftungen <code>"x"</code> und
<code>"y"</code>.
* @param functionGroup die Funktionen dieses 2D Plotters.
*/
public FLGPlotter2D(FLGFunctionGroup2D functionGroup) {
this(functionGroup, null, "x", "y");
}

/**
* Erzeugt einen 2D Plotter mit der spezifizierten Funktionsgruppe
und den spezifizierten Achsenbeschriftungen.
* @param functionGroup die Funktionen dieses 2D Plotters.
* @param xAxisName die <i>x</i>-Achsenbezeichnung.
* @param yAxisName die <i>y</i>-Achsenbezeichnung.
*/
public FLGPlotter2D(FLGFunctionGroup2D functionGroup, String
xAxisName, String yAxisName) {
this(functionGroup, null, xAxisName, yAxisName);
}

/**
* Erzeugt einen 2D Plotter mit der spezifizierten Polygonengruppe
und den
* Standard-Achsenbeschriftungen <code>"x"</code> und
<code>"y"</code>.
* @param polygonGroup die Polygone dieses 2D Plotters.
*/
public FLGPlotter2D(FLGPolygonGroup2D polygonGroup) {
this(null, polygonGroup, "x", "y");
}

/**
* Erzeugt einen 2D Plotter mit der spezifizierten Polygonengruppe
und den spezifizierten Achsenbeschriftungen.
* @param polygonGroup die Polygone dieses 2D Plotters.
* @param xAxisName die <i>x</i>-Achsenbezeichnung.
* @param yAxisName die <i>y</i>-Achsenbezeichnung.
*/
public FLGPlotter2D(FLGPolygonGroup2D polygonGroup, String
xAxisName, String yAxisName) {
this(null, polygonGroup, xAxisName, yAxisName);
}
 
A

Andrew Thompson

currently we are trying to convert a java gui program into an applet.

Why? JWS can allow the end user to launch a Java application
from a web-link.

Better,
- JWS can update automatically
- JWS includes automatic support for Java JRE versionning.
- the app. needs no conversion to applet (some ways of doing
things in applications are very different to applets)
- it avoids all the problems with applets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top