Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Japplet

Thread view: 
d.schulz81@gmx.net - 02 Dec 2005 18:26 GMT
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
klynn47@comcast.net - 02 Dec 2005 18:41 GMT
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.
zero - 02 Dec 2005 18:42 GMT
d.schulz81@gmx.net wrote in news:1133547988.367519.290930
@g47g2000cwa.googlegroups.com:

> HI there
>
[quoted text clipped - 21 lines]
>
> Dennis

try posting the code that generates this error

Signature

Beware the False Authority Syndrome

d.schulz81@gmx.net - 04 Dec 2005 13:26 GMT
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);
   }
Andrew Thompson - 07 Dec 2005 23:35 GMT
> 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

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.