FileDocCategorySizeDatePackage
ComponentFrame.javaAPI DocGlassfish v2 API2852Mon Oct 17 14:54:16 BST 2005None

ComponentFrame

public class ComponentFrame extends JFrame
this Frame provides a utility class for displaying a single Component in a Frame.
version
1.8, 01/05/23
author
Christopher Cotton

Fields Summary
Constructors Summary
public ComponentFrame(Component what)
creates the frame

param
what the component to display

	this(what, "Component Frame");
    
public ComponentFrame(Component what, String name)
creates the frame with the given name

param
what the component to display
param
name the name of the Frame

	super(name);

	// make sure that we close and dispose ourselves when needed
	setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

	// default size of the frame
	setSize(700,600);

	// we want to display just the component in the entire frame
	if (what != null) {
	    getContentPane().add("Center", what);
	}
    
Methods Summary