1 31 package org.objectweb.proactive.examples.doctor; 32 33 import org.objectweb.proactive.core.config.ProActiveConfiguration; 34 35 36 49 public class AppletEntrance extends org.objectweb.proactive.examples.StandardFrame { 50 51 public AppletEntrance(String name, int width, int height) { 52 super(name, width, height); 53 } 54 55 56 public static void main(String arg[]) { 57 ProActiveConfiguration.load(); 58 new AppletEntrance("The salishan problems", 600, 300); 59 } 60 61 62 public void start() { 63 receiveMessage("Please wait while initializing remote objects"); 64 try { 65 Office off = (Office)org.objectweb.proactive.ProActive.newActive(Office.class.getName(), new Object []{new Integer (0)}); 66 Receptionnist recept = (Receptionnist)org.objectweb.proactive.ProActive.newActive(Receptionnist.class.getName(), new Object []{off}); 67 receiveMessage("The doctors' office is open!"); 68 off.init(off, recept); 69 } catch (Exception e) { 70 e.printStackTrace(); 71 } 72 } 73 74 75 protected javax.swing.JPanel createRootPanel() { 76 javax.swing.JPanel rootPanel = new javax.swing.JPanel (new java.awt.BorderLayout ()); 77 rootPanel.setBackground(java.awt.Color.white); 78 rootPanel.setForeground(java.awt.Color.red); 79 rootPanel.add(new javax.swing.JLabel ("The salishan problems : Problem 3 - The Doctor's Office"), java.awt.BorderLayout.NORTH); 80 82 return rootPanel; 83 } 84 } | Popular Tags |