import java.applet.Applet; import java.awt.*; import java.net.*; import java.rmi.*; public class ExempleAppletRmiSlave extends Applet { public int p = 0 ; private String objet; private boolean bc = true ; private ExempleAppletRmiInterface b; public ExempleAppletRmiSlave() { setBackground(Color.white); } public void init() { URL url = this.getDocumentBase(); objet = "rmi://"+url.getHost()+"/objet" ; try { b =(ExempleAppletRmiInterface) Naming.lookup(objet); } catch( RemoteException e) { } catch( NotBoundException e) { } catch( MalformedURLException e) { } ; ExempleAppletRmiThread art; art = new ExempleAppletRmiThread(this,b) ; art.start() ; } public void paint(Graphics g) { g.drawRect(25*p+2,3,20,120) ; } }