import javax.swing.JApplet;

import jsdai.SMachining_schema.SMachining_schema;
import jsdai.lang.SdaiException;
import jsdai.lang.SdaiModel;
import jsdai.lang.SdaiRepository;
import jsdai.lang.SdaiSession;

public class Main_step_robot extends JApplet{
	Iniciar janela_principal = new Iniciar();	
	public void init(){
		try {
			jbInit();
		} catch (Exception e1) {			
			e1.printStackTrace();
		}
		try {
			part21();
		} catch (SdaiException e2) {			
			e2.printStackTrace();
		}
	}	
	private void jbInit() throws Exception {
		this.getContentPane().add(janela_principal.iniciar_painel);	
	}
	private void part21() throws SdaiException{
				
		SdaiSession session = SdaiSession.openSession();
		session.startTransactionReadWriteAccess();
		SdaiRepository repository = session.createRepository("", null);
		repository.openRepository();
		SdaiModel model = repository.createSdaiModel("DemoSTEP_NC", SMachining_schema.class);
		model.startReadWriteAccess();
	}	
}
