Reputation: 21
I setup my eclipse for PROCESSING perfectely.. I am using Eclipse Oxygen and installed PROCESSING 3.3.6 i am trying to run processing program in eclipse and there is no option is run as Applet My code is below :
package processing01;
import processing.core.PApplet;
public class Processing01 extends PApplet{
public static void main(String[] args) {
PApplet.main("Processing01");
}
public void settings(){
size(300,300);
}
public void setup(){
fill(120,50,240);
}
public void draw(){
ellipse(width/2,height/2,second(),second());
}
}
Upvotes: 0
Views: 255
Reputation: 21
Because having package the code would be
//replace
PApplet.main("Processing01");
//with
PApplet.main("processing01.Processing01");
Upvotes: 0
Reputation: 42176
Processing 3 no longer supports running as an applet. From the Processing 3 change list:
Applet is gone — Java's
java.awt.Applet
is no longer the base class used byPApplet
, so any sketches that make use of Applet-specific methods (or assume that aPApplet
is a Java AWT Component object) will need to be rewritten.
The PApplet
class no longer extends the Applet
class, which means you can't treat Processing sketches as a component anymore, and you can't run them as an applet. You can only run them as an application.
Applets are dead, and shouldn't be used anyway.
Upvotes: 1