FileDocCategorySizeDatePackage
NamingServiceFrame.javaAPI DocExample1319Thu Nov 08 00:22:54 GMT 2001com.ora.rmibook.chapter15.basicapps

NamingServiceFrame

public class NamingServiceFrame extends JFrame

Fields Summary
Constructors Summary
public NamingServiceFrame()

        buildGUI();
        startBaseContext();
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        addWindowListener(new ExitOnClose());
    
Methods Summary
private voidbuildGUI()

        JPanel mainPanel = new JPanel(new BorderLayout());
        JTextArea messageArea = new JTextArea("Close this window to shut down the naming service");

        mainPanel.add(messageArea, BorderLayout.CENTER);
        getContentPane().add(mainPanel);
        setSize(250, 100);
    
private voidstartBaseContext()

        try {
            BaseContextImpl baseContext = new BaseContextImpl();

            baseContext.vendStubViaSocket();
        } catch (RemoteException e) {
            System.out.println("Couldn't Create Base Context.");
            System.out.println("Error was " + e);
            e.printStackTrace();
        }