FileDocCategorySizeDatePackage
ProtoDialog.javaAPI DocExample985Sat Feb 05 11:57:00 GMT 2000None

ProtoDialog

public class ProtoDialog extends JDialog

Fields Summary
JComboBox
protoBox
JComboBox
portBox
Constructors Summary
public ProtoDialog(Frame f, String t)

		super(f, t, true);

		Container cp = getContentPane();
		cp.setLayout(new GridLayout(2,2));
		cp.add(new JLabel("Protocol:", JLabel.RIGHT));
		cp.add(protoBox = new JComboBox());
		protoBox.addItem("Ping");
		protoBox.addItem("RMI");
		protoBox.addItem("CORBA");
		protoBox.addItem("WWW");
		protoBox.setEditable(true);
		cp.add(new JLabel("Port:", JLabel.RIGHT));
		cp.add(portBox = new JComboBox());
		portBox.addItem("0");
		portBox.addItem("1099");
		portBox.addItem("28735");
		portBox.setEditable(true);
		pack();
	
Methods Summary
public java.lang.StringgetPort()

		return portBox.getSelectedItem().toString();
	
public java.lang.StringgetProto()

		return protoBox.getSelectedItem().toString();
	
public static voidmain(java.lang.String[] args)

		new ProtoDialog(new Frame("ProtoDialog dummy parent"),
			"ProtoDialog Test").setVisible(true);