FileDocCategorySizeDatePackage
PPP.javaAPI DocExample1160Tue Oct 02 20:04:26 BST 2001myprojects.ppp

PPP

public class PPP extends Frame

Fields Summary
private PSubClass
p
Constructors Summary
public PPP()

		addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				dispose();
				System.exit(0);
			}
		});
	
Methods Summary
public static voidmain(java.lang.String[] args)

		System.out.println("Starting PPP...");
		PPP mainFrame = new PPP();
		mainFrame.setSize(500, 300);
		mainFrame.setTitle("PPP");
		mainFrame.setVisible(true);
		
		
	
public voidpaint(java.awt.Graphics g)

		// Instantiate the object p
		p = new PSubClass();
		// Call its only method
		g.drawString("Calling p.getString() " + p.getString(),20,100);
		// 
		g.drawString("Accessing the protected String directly " + p.s,20,200);