First applet with monkey object are not visible

hello i've got a problem.

i copy a first applet code to NetBeans:

 * To change this template, choose Tools | Templates
 * and open the template in the editor.

package netApplet;
import java.awt.*;
import java.applet.*;
import* ;
import com.jmex.awt.applet.SimpleJMEApplet ;

import com.jme.math.Vector3f ;
import com.jme.scene.TriMesh ;
import com.jme.math.Quaternion ;
import com.jme.scene.shape.Box ;
import com.jme.bounding.BoundingBox;
import com.jme.scene.state.TextureState ;
import com.jme.util.TextureManager ;
import com.jme.math.FastMath ;
import com.jme.scene.ImposterNode;
import com.jme.image.Texture;
import com.jme.scene.shape.Sphere;

import java.util.logging.Logger;
import org.lwjgl.test.WindowCreationTest ;

import com.jme.bounding.BoundingBox;
import com.jme.image.Texture;
import com.jme.math.Quaternion;
import com.jme.math.Vector3f;
import com.jme.scene.shape.Sphere;
import com.jme.scene.state.AlphaState;
import com.jme.scene.state.TextureState;
import com.jme.util.TextureManager;
import com.jme.util.resource.MultiFormatResourceLocator;
import com.jme.util.resource.ResourceLocatorTool;
import com.jme.util.resource.SimpleResourceLocator;

import com.jme.image.Image ;

import com.jme.image.util.* ; // image loadery
 <applet code="run" width=500 height=500>
 * @author mitrydates
class ball implements Runnable {
    public void run(){

            }catch(Exception e){

            public void setData(){


public class run extends SimpleJMEApplet {

     * Initialization method that will be called after the applet is loaded
     * into the browser.
    private TriMesh t;
    private Quaternion rotQuat;
    private float angle = 0;
    private Vector3f axis;

    public void simpleAppletSetup() {
        rotQuat = new Quaternion();
        axis = new Vector3f(1, 1, 0.5f).normalizeLocal();
        Vector3f max = new Vector3f(25, 25, 25);
        Vector3f min = new Vector3f(-25, -25, -25);

      t = new Box("Box", min, max);
        t.setModelBound(new BoundingBox());
        t.setLocalTranslation(new Vector3f(0, 0, -150));

      Sphere s = new Sphere("Sphere", 63, 50, 250);
      s.setLocalTranslation(new Vector3f(10,10,-40));
      s.setModelBound(new BoundingBox());
      s.setRandomColors() ;

        TextureState ts = getRenderer().createTextureState();
        com.jme.image.Image img = new com.jme.image.Image();
        try {
            img = JPGLoader.loadImage(new"d:\iraq.jpg")) ;  //new Image();
        }catch(Exception e){

        Texture tx = new Texture() ;
        tx.setImage(img) ;


      AlphaState alpha = getRenderer().createAlphaState();


    public void simpleAppletRender() {
        if (status == STATUS_DESTROYING) {
            com.jme.scene.ImposterNode in = new com.jme.scene.ImposterNode();
            status = STATUS_DEAD;

    public void simpleAppletUpdate() {
        float tpf = getTimePerFrame();
        if (tpf < 1) {
            angle = angle + (tpf * 25);
            if (angle > 360) {
                angle -= 360;

        rotQuat.fromAngleNormalAxis(angle * FastMath.DEG_TO_RAD, axis);

    public void stop() {
        status = STATUS_DESTROYING;
        long time = System.currentTimeMillis();
        while (status != STATUS_DEAD && (System.currentTimeMillis() - time) < 5000) { // only keep waiting for 5 secs
            try {
            } catch (InterruptedException e) {

    public void init() {
    public void start(){
        AppletContext ac = getAppletContext();
        URL url = getCodeBase();
            //ac.showDocument(new URL(url + "netApplet/Test.html"));
        }catch(Exception e){

    public void paint(Graphics g){

    // TODO overwrite start(), stop() and destroy() methods

i configured netBeans (i ' have no error) but when applet is started he is empty. ther is no object like sphere or box on  him.  where i have an error ??. 

If you copy your scene setup into a Simple Game and run that, does your scene render?

Yes it works.

but in siempleGame i add al pobjects in simpleInitGame() method.

in applet i add it in simpleAppletSetup().  mybe i need to add it in init() applet ??.

simpleAppletSetup() should be the right place for you. Have a look at the java console output when you try to run your applet. Maybe something else is going on, like its not loading the lwjgl native or missing jars.

i use NetBeans and there is no error (Exception) on console.

If you are running your applet from a browser, then the console of netbeans might not be capturing the output. Try checking the java console. It can be turned on from the Java control panel.

LOL it works now.

it didn't works becouse i have in my main class method like





when i delete them  it work great!!

thanks for help