FileDocCategorySizeDatePackage
PingClientFrame.javaAPI DocExample1555Thu Nov 08 00:23:50 GMT 2001com.ora.rmibook.chapter8.stuckconstructor

PingClientFrame

public class PingClientFrame extends ExitingFrame

Fields Summary
Constructors Summary
Methods Summary
protected voidbuildGUI()

        JPanel contentPane = new JPanel(new BorderLayout());
        JButton pingButton = new JButton("Ping!");

        pingButton.addActionListener(new PingListener());
        contentPane.add(pingButton, BorderLayout.CENTER);
        setContentPane(contentPane);
        setSize(250, 100);
    
private PinggetStub()

        Ping returnValue = null;

        try {
            FileInputStream file = new FileInputStream("C:\\temp\\ping_stub");
            ObjectInputStream objectInputStream = new ObjectInputStream(file);

            returnValue = (Ping) objectInputStream.readObject();
        } catch (Exception e) {
            System.out.println("Error reading stub from file");
            e.printStackTrace();
        }
        return returnValue;