public void startMIDlet(String name)
        throws
            InstantiationException,
            ClassNotFoundException,
            IllegalAccessException {
            	
        if(active != null && !active.inDestruction){
            try{
        		    active.inDestruction = true;
        		    active.destroyApp(true);
            }
        	    catch(Exception e){
        	        e.printStackTrace();
        	    }
        }
            	
        MIDlet midlet = null;

        if (classLoader != null) {
            midlet = ((MIDlet) classLoader.loadClass(name).newInstance());
        }
        else {
            midlet = ((MIDlet) Class.forName(name).newInstance());
        }

        // Throw away everything in the current DisplayContainer. Tell
        // the ApplicationManager that the newly created MIDlet is the
        // active one. Then run it.
        //        displayContainer.removeAll();
        //displayContainer.setLayout(new java.awt.BorderLayout());
        //displayContainer.setBackground(bgColor);

        active = midlet;
        start();
    }