FileDocCategorySizeDatePackage
BordLayPanel.javaAPI DocExample1067Sat Nov 25 12:55:12 GMT 2000None

BordLayPanel

public class BordLayPanel extends Frame
BordLayPanel.java - BorderLayout with a Panel
author
Ian Darwin, ian@darwinsys.com, for Learning Tree Course 478

Fields Summary
TextField
fileName
TextArea
main
Label
status
Constructors Summary
BordLayPanel()

		super("BordLayPanel");
		Panel p;
		Button b;
		setLayout(new BorderLayout());
		add(BorderLayout.NORTH,  p = new Panel());
			p.setLayout(new FlowLayout());
			p.add(new Label("FileName:"));
			p.add(fileName  = new TextField(40));
			p.add(b = new Button("Load"));
			// now you need to add an action listener to the button
		add(BorderLayout.CENTER, main = new TextArea(24,80));
		add(BorderLayout.SOUTH,  status = new Label(""));
		pack();
		
		// Don't forget to add a window listener so the quit control works
	
Methods Summary
public static voidmain(java.lang.String[] av)

		new BordLayPanel().setVisible(true);
	
public voidshowStatus(java.lang.String msg)
Simulate applet.showStatus() for Frame-based applications

		if (msg == null)
			msg = "";
		status.setText(msg);