FileDocCategorySizeDatePackage
AllClasses.javaAPI DocExample560Sat Apr 28 10:22:44 BST 2001None

AllClasses.java

import java.awt.event.*;
import javax.swing.*;

public class AllClasses {
	/** Inner class can be used anywhere in this file */
	public class Data {
		int x;
		int y;
	}
	public void getResults() {
		JButton b = new JButton("Press me");
		b.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				System.out.println("Thanks for pressing me");
			}
		});
	}
}

/** Class contained in same file as AllClasses, but can be used
 * (with a warning) in other contexts.
 */
class AnotherClass {
	// methods and fields here...
}